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

   ### Describe the bug
   
   Discovered in #15482.
   
   When a statement causes a plan_err, running `EXPLAIN` on that statement 
produces only an empty plan result.
   
   ### To Reproduce
   
   Run the following statements:
   
   ```sql
   -- Create a table with an INT column
   > CREATE TABLE t AS SELECT CAST(123 AS int) a;
   0 row(s) fetched.
   Elapsed 0.072 seconds.
   
   -- This query triggers a type coercion error
   > SELECT * FROM t WHERE a = '9999999999';
   type_coercion
   caused by
   Error during planning: Cannot coerce '9999999999' to type 'Int32'
   
   -- But explain just returns an empty plan
   > EXPLAIN SELECT * FROM t WHERE a = '9999999999';
   +-----------+------+
   | plan_type | plan |
   +-----------+------+
   +-----------+------+
   0 row(s) fetched.
   Elapsed 0.004 seconds.
   ```
   
   ### Expected behavior
   
   provide a meaningful error message or indicate that planning failed
   
   ### 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