qri-io / qri

you're invited to a data party!
https://qri.io
GNU General Public License v3.0
1.1k stars 66 forks source link

converting dataframe columns to structure.schema requires cloning #1943

Open dustmop opened 2 years ago

dustmop commented 2 years ago

In https://github.com/qri-io/qri/pull/1942, in function assignStructureFromDataframeColumns in transform/startf/ds/dataset.go, I added a bit of code to clone the schema by serializing and unserializing it. This is required to get the unit tests to pass; if not present, the columns are treated as strings instead of integers, which changes how they are displayed when converted to json. Not sure why this is happening, it would be good to investigate and gain a better understanding of what's going on here, in order to remove this hack.