-
Notifications
You must be signed in to change notification settings - Fork 100
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
throw an error instead of returning empty if client fails to deserialize query results #185
Comments
Nice catch, thank you. The problem is that in the case of incorrect schema (here
However, the stream ends earlier, and the cursor doesn't check that the remaining unparsed bytes are left. This bug was introduced in #169. Previously, the cursor checked this situation. So, the valid error should be "NotEnoughData". |
@loyd thanks for your response and quick fix. |
It's impossible to determine precisely the place of an error (in more complex cases than this one) without #10 |
Example:
define a struct MyRow with a field: decimal_col: Option
create a table with a column: decimal_col Nullable(Decimal(10, 4)))
when executing a query, deserialization should fail and client should throw an error to user.
but currently client just returns empty results.
output:
rows count: 0
rows: []
The text was updated successfully, but these errors were encountered: