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

   ### Describe the bug
   
   A trivially unsatisfiable WHERE clause with a divide-by-zero can result in 
`context.sensitivity` being `None`, which fails an assert in physical expr 
analysis.
   
   ### To Reproduce
   
   ```
   CREATE TABLE t0;
   SELECT COUNT(*) FROM t0 AS tt0 WHERE (4==(3/0));
   ```
   
   Yields
   
   ```
   Internal error: Assertion failed: context.selectivity == Some(0.0): 
AnalysisContext has a non-zero selectivity although it represents an empty 
table.
   This issue was likely caused by a bug in DataFusion's code. Please help us 
to resolve this by filing a bug report in our issue tracker: 
https://github.com/apache/datafusion/issues
   ```
   
   ### Expected behavior
   
   _No response_
   
   ### Additional context
   
   Proposed fix: weaken the assertion to allow `None` as a valid value.


-- 
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