-
Notifications
You must be signed in to change notification settings - Fork 40
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
truncated dynamic value while querying with v1.0.0-preview-4
#265
Comments
Thank you, looking into this. If you could provide us with a sample to what the field looks like it could be very helpful. I tried it with a longer value (2000 characters), and hadn't gotten this error. Can you provide also the schema of the table? |
I managed to take a second look, and reduced the minimal repro to a KQL query that looks like: datatable (event_properties: dynamic) [
dynamic({"first_field":"[\"elem1\",\"elem2\"]","second_field":"0000000000000000"})
] I updated the repro steps above with the pseudo-code and the output I observed. It seems that when the property bag has a JSON-array element, The decoded JSON in {"first_field":"[\"elem1\",\"elem2\"]","second_field":"00000000000000 |
ToStructs
fails in preview-4 with error unexpected end of JSON input
v1.0.0-preview-4
Thank you for the detailed research! It seems that the culprit is the new json library we used, while it did gave us some performance benefits, it seems that it doesn't handle edge cases well. We will release a version soon which is back to the standard json library. |
Hey, try preview-5 please |
It's been a week since the new release, since the version has a fix I'm going to close this issue. Feel free to comment or re-open as needed. |
@AsafMah thanks for the fix. I can confirm the behavior is fixed with preview-5. |
Describe the bug
I am getting an error while using
query.ToStructs
. The error is:This started happening on
v1.0.0-preview-4
. This same code is working withv1.0.0-preview-3
, I've switched back in the meantime.As a brief debugging step, I dumped the string that is being processed in
dynamic.go
and confirmed that the JSON-string is truncated (malformed), with a length of exactly 1275.To Reproduce
Pseudo-code (without the database connection information):
Output:
Expected behavior
toStructs
shouldn't fail handling valid, but long (1275+ long) dynamic property bags.The text was updated successfully, but these errors were encountered: