alamb commented on issue #3863:
URL: https://github.com/apache/datafusion/issues/3863#issuecomment-6616278503

   I think this is fixed
   
   ```sql
   COPY (SELECT CAST(column1 AS INT) AS col1 FROM (VALUES (1),(4),(5),(7),(8))) 
TO 'issue_3863.parquet';
     CREATE EXTERNAL TABLE t STORED AS PARQUET LOCATION 'issue_3863.parquet';
     EXPLAIN FORMAT indent SELECT * FROM t WHERE CAST(col1 AS BIGINT) BETWEEN 4 
AND 4 + 3;
   ```
   
   Shows that there are no casts
   ```
   |               |     DataSourceExec: file_groups={1 group: 
[[Users/andrewlamb/issue_3863.parquet]]}, projection=[col1], file_type=parquet, 
predicate=col1@0 >= 4 AND col1@0 <= 7, pruning_predicate=col1_null_count@1 != 
row_count@2 AND col1_max@0 >= 4 AND col1_null_count@1 != row_count@2 AND 
col1_min@3 <= 7, required_guarantees=[] |
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to