-
Notifications
You must be signed in to change notification settings - Fork 16
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
Extension incorrectly parses int64 type #97
Comments
It is because javascript doesn't support int64 type. You have to convert it to string before load them in grid or virtualization mode. |
The bad thing is that extension silently misleads about the data that's contained in the table (this big number in the example was an id). JS has BigInt class to deal with larger integer types. Also I'm fine with treating it as string but I guess sorting will work incorrect then. |
The underlying lib node-q doesn't use bigint. Though my lib (jkdb) uses bigint, sending json message to grid or virtualization still has to convert bigint to general number. I will think if it is possible to send arrow format. However, I am less likely to implement the feature for vscode-q. You could try kx's official plugin and ask them to fix it. |
This is already available in There's a |
Grid/virtualization mode is an independent html page from vscode-q conn manager, when vscode-q got data from kdb, it has to send data to grid/virtualization html page. The data conversion caused losing precision. Sending as string data type to grid/virtualization page, the chart cannot display properly. |
Side question: do debug breakpoints for typescript code of the extension (client) work in your environment? Looks like mine vscode can't find sourcemaps:
I've tried both PS want to experiment with https://github.com/sidorares/json-bigint or encoding everything as an object with manual deserialization on webview side |
We store in one column int64 values.
In grid view last two digits become zeroes.
In visualization they are rendered as int32_min.
E.g.
1608532083302613811 in grid view becomes 1608532083302613800. In visualization: -2,147,483,648
The text was updated successfully, but these errors were encountered: