fix(query): Fix copy into Variant field panic with infinite number #18962
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/
Summary
The PR fix the bug copy into infinite number to Variant field caused panic
for example:
we have the following
numbers.ndjsonfile, the number1.0e999999is a infinite number{"id": 1, "value": 100, "score": 1.0e38} {"id": 2, "value": 200, "score": -1.0e77} {"id": 3, "value": 300, "score": 1.0e999999}Since the infinite number exceeds the range of f64, we convert it to a null value
Tests
Type of change
This change is