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

   ### Describe the bug
   
   Trying to debug another bug and I found that `explain` is broken in two ways:
   1. It's replacing the actual expressions with `__comon_expr` which seems 
like an optimization but that should not preclude seeing the values in the 
output.
   2. explain verbose uses the tree format (as opposed to the line format as 
claimed in the documentation), is verbose being ignored altogether?
   
   ### To Reproduce
   
   ```sql
   COPY (
       SELECT arrow_cast('2025-01-01T00:00:00Z'::timestamptz, 
'Timestamp(Microsecond, Some("UTC"))') AS start_timestamp
   )
   TO 'test.parquet'
   STORED AS PARQUET;
   CREATE EXTERNAL TABLE test STORED AS PARQUET LOCATION 'test.parquet';
   explain verbose
   select start_timestamp from test where start_timestamp::time between 
arrow_cast('20:04:13', 'Time64(Nanosecond)') and arrow_cast('20:08:13', 
'Time64(Nanosecond)');
   ```
   
   ```
   +---------------+-------------------------------+
   | plan_type     | plan                          |
   +---------------+-------------------------------+
   | physical_plan | ┌───────────────────────────┐ |
   |               | │    CoalesceBatchesExec    │ |
   |               | │    --------------------   │ |
   |               | │     target_batch_size:    │ |
   |               | │            8192           │ |
   |               | └─────────────┬─────────────┘ |
   |               | ┌─────────────┴─────────────┐ |
   |               | │         FilterExec        │ |
   |               | │    --------------------   │ |
   |               | │         predicate:        │ |
   |               | │     __common_expr_3 >=    │ |
   |               | │       72253000000000      │ |
   |               | │   AND __common_expr_3 <=  │ |
   |               | │       72493000000000      │ |
   |               | └─────────────┬─────────────┘ |
   |               | ┌─────────────┴─────────────┐ |
   |               | │       ProjectionExec      │ |
   |               | │    --------------------   │ |
   |               | │      __common_expr_3:     │ |
   |               | │  CAST(start_timestamp AS  │ |
   |               | │     Time64(Nanosecond))   │ |
   |               | │                           │ |
   |               | │      start_timestamp:     │ |
   |               | │      start_timestamp      │ |
   |               | └─────────────┬─────────────┘ |
   |               | ┌─────────────┴─────────────┐ |
   |               | │       DataSourceExec      │ |
   |               | │    --------------------   │ |
   |               | │          files: 1         │ |
   |               | │      format: parquet      │ |
   |               | └───────────────────────────┘ |
   |               |                               |
   +---------------+-------------------------------+
   ```
   
   ### 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: [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