We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Float16
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
Performing a query where a Float16 column is compared to an integer literal results in the Float16 being cast to Int64.
Int64
> explain format indent select * from 'parquet-testing/data/float16_nonzeros_and_nans.parquet' where x > 2; +---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | plan_type | plan | +---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | logical_plan | Filter: CAST(parquet-testing/data/float16_nonzeros_and_nans.parquet.x AS Int64) > Int64(2) | | | TableScan: parquet-testing/data/float16_nonzeros_and_nans.parquet projection=[x], partial_filters=[CAST(parquet-testing/data/float16_nonzeros_and_nans.parquet.x AS Int64) > Int64(2)] | | physical_plan | CoalesceBatchesExec: target_batch_size=8192 | | | FilterExec: CAST(x@0 AS Int64) > 2 | | | RepartitionExec: partitioning=RoundRobinBatch(8), input_partitions=1 | | | DataSourceExec: file_groups={1 group: [[Users/seidl/src/datafusion/parquet-testing/data/float16_nonzeros_and_nans.parquet]]}, projection=[x], file_type=parquet, predicate=CAST(x@0 AS Int64) > 2 | | | | +---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
./target/debug/datafusion-cli -c "explain format indent select * from 'parquet-testing/data/float16_nonzeros_and_nans.parquet' where x > 2;"
This should instead cast 2 to Float16.
2
+---------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | plan_type | plan | +---------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | logical_plan | Filter: parquet-testing/data/float16_nonzeros_and_nans.parquet.x > Float16(2) | | | TableScan: parquet-testing/data/float16_nonzeros_and_nans.parquet projection=[x], partial_filters=[parquet-testing/data/float16_nonzeros_and_nans.parquet.x > Float16(2)] | | physical_plan | CoalesceBatchesExec: target_batch_size=8192 | | | FilterExec: x@0 > 2 | | | RepartitionExec: partitioning=RoundRobinBatch(8), input_partitions=1 | | | DataSourceExec: file_groups={1 group: [[Users/seidl/src/datafusion/parquet-testing/data/float16_nonzeros_and_nans.parquet]]}, projection=[x], file_type=parquet, predicate=x@0 > 2, pruning_predicate=x_null_count@1 != row_count@2 AND x_max@0 > 2, required_guarantees=[] | | | | +---------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
No response
The text was updated successfully, but these errors were encountered:
take
Sorry, something went wrong.
etseidl
Successfully merging a pull request may close this issue.
Describe the bug
Performing a query where a
Float16
column is compared to an integer literal results in theFloat16
being cast toInt64
.To Reproduce
Expected behavior
This should instead cast
2
toFloat16
.Additional context
No response
The text was updated successfully, but these errors were encountered: