[
https://issues.apache.org/jira/browse/CALCITE-5343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17623572#comment-17623572
]
Jiajun Xie commented on CALCITE-5343:
-------------------------------------
[~mbudiu], There some divide operator unit test in
[SqlValidatorTest#testNumericOperators|https://github.com/apache/calcite/blob/5d771d8c6d706fda2f6a36332717c64adc657f38/core/src/test/java/org/apache/calcite/test/SqlValidatorTest.java#L4228]
Maybe it is useful for you.
> Type of division operator
> -------------------------
>
> Key: CALCITE-5343
> URL: https://issues.apache.org/jira/browse/CALCITE-5343
> Project: Calcite
> Issue Type: Bug
> Components: core
> Reporter: Mihai Budiu
> Priority: Minor
>
> The Calcite type checker assigns a type of INTEGER (not nullable) to the
> DIVIDE RexCall in the following statement: `SELECT 1/0`. Some databases, such
> as MySQL, evaluate this expression to NULL.
> This result is obtained even when using SqlConformanceEnum.MYSQL_5 for the
> parser and the validator.
> My question is whether there is some other way to influence how type
> inference is performed for division.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)