You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2020/04/16 04:00:43 UTC
[GitHub] [calcite] danny0405 opened a new pull request #1919: [CALCITE-3894] The Union operation between DATE with TIMESTAMP return…
danny0405 opened a new pull request #1919: [CALCITE-3894] The Union operation between DATE with TIMESTAMP return…
URL: https://github.com/apache/calcite/pull/1919
…s a wrong result
The RelDataTypeFactory#leastRestrictive finds the common type for IN,
CASE and SET operations. For common type with DATE and TIMESTAMP, it
returns DATE. The root cause is that rules in SqlTypeAssignmentRule
decide that DATE is assignable from TIMESTAMP and TIMESTAMP is
assignable from DATE, which is actually wrong. Although in Java, this
assignment makes sense but that does not mean it's true in SQL, because DATE
and TIMESTAMP have different time unit.
Fix the rules in SqlTypeAssignmentRule and let the implicit type
coercion rule trigger.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [calcite] danny0405 closed pull request #1919: [CALCITE-3894] The Union operation between DATE with TIMESTAMP return…
Posted by GitBox <gi...@apache.org>.
danny0405 closed pull request #1919: [CALCITE-3894] The Union operation between DATE with TIMESTAMP return…
URL: https://github.com/apache/calcite/pull/1919
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services