Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TableDisplay corrupts data in groovy #7645

Closed
altavir opened this issue Jul 4, 2018 · 4 comments
Closed

TableDisplay corrupts data in groovy #7645

altavir opened this issue Jul 4, 2018 · 4 comments
Assignees

Comments

@altavir
Copy link

altavir commented Jul 4, 2018

Conversation of map to TableDisplay corrupts map itself instead of creating a copy:

def b = ["a" : 2, "b" : 3, "c" : 4]
println(b)
println(b.a)

[a:2, b:3, c:4]
2

println(b)
println(b.a)

[type:TableDisplay, columnNames:[Key, Value], values:[[a, 2], [b, 3], [c, 4]], subtype:Dictionary]
null

@scottdraves
Copy link
Contributor

thanks for the report but i am not able to reproduce, even if i remove the "def", which allows the 2nd cell to run. what am i missing?

@altavir
Copy link
Author

altavir commented Jul 5, 2018

Sorry, it seems to I forgot to restart the notebook and forgot that Groovy is copying links instead of values. The problem has something to do with autotranslation.
Try beakerx.b = ["a" : 2, "b" : 3, "c" : 4] and then beakerx.b in another cell. Second one is broken.

@altavir
Copy link
Author

altavir commented Jul 5, 2018

Correction even beakerx.a = a; beakerx.a is broken.

@scottdraves
Copy link
Contributor

yes this is a deficiency, essentially values we get back from autotranslation are not converted to the right class, they are left in JSON. Here's another case of it: #7610
Your case demonstrates it more clearly, actually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants