adriangb opened a new issue, #17077:
URL: https://github.com/apache/datafusion/issues/17077

   ### Describe the bug
   
   Planning failure:
   
   ```
   Error during planning: Plan: ["SortPreservingMergeExec: [start_timestamp@1 
ASC NULLS LAST, trace_id@2 ASC NULLS LAST]", "  SortExec: 
expr=[start_timestamp@1 ASC NULLS LAST], preserve_partitioning=[true]", "    
DataSourceExec: file_groups={2 groups: 
[[Users/adriangb/GitHub/datafusion/data/1.parquet], 
[Users/adriangb/GitHub/datafusion/data/2.parquet]]}, 
projection=[deployment_environment, start_timestamp, trace_id], 
file_type=parquet, predicate=trace_id@0 = 00000000000000000000000000000002 AND 
deployment_environment@1 = staging, pruning_predicate=trace_id_null_count@2 != 
row_count@3 AND trace_id_min@0 <= 00000000000000000000000000000002 AND 
00000000000000000000000000000002 <= trace_id_max@1 AND 
deployment_environment_null_count@6 != row_count@3 AND 
deployment_environment_min@4 <= staging AND staging <= 
deployment_environment_max@5, required_guarantees=[deployment_environment in 
(staging), trace_id in (00000000000000000000000000000002)]"] does not satisfy 
order requirements: [start_t
 imestamp@1 ASC NULLS LAST, trace_id@2 ASC NULLS LAST]. Child-0 order: 
[[start_timestamp@1 ASC NULLS LAST]]
   ```
   
   ### To Reproduce
   
   ```sql
   COPY (
       SELECT
           '00000000000000000000000000000001' AS trace_id,
           'staging' AS deployment_environment,
           '2023-10-01 00:00:00'::timestamptz AS start_timestamp
   )
   TO 'data/1.parquet';
   
   COPY (
       SELECT
           '00000000000000000000000000000002' AS trace_id,
           'prod' AS deployment_environment,
           '2023-10-01 00:00:01'::timestamptz AS start_timestamp
   )
   TO 'data/2.parquet';
   
   CREATE EXTERNAL TABLE t1
   STORED AS PARQUET
   LOCATION 'data/';
   
   SET datafusion.execution.parquet.pushdown_filters = true;
   
   SELECT deployment_environment
   FROM t1
   WHERE trace_id='00000000000000000000000000000002' and deployment_environment 
= 'staging'
   ORDER BY start_timestamp, trace_id;
   ```
   
   ### Expected behavior
   
   _No response_
   
   ### Additional context
   
   _No response_


-- 
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: github-unsubscr...@datafusion.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to