[
https://issues.apache.org/jira/browse/CALCITE-4620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17352202#comment-17352202
]
Julian Hyde commented on CALCITE-4620:
--------------------------------------
[~swtalbot], Good point. I considered those options, and it was a close call,
but I decided to keep {{SqlOperator.reverse()}} separate from
{{SqlKind.reverse()}}. Rationale:
# {{SqlKind}} should not depend on {{SqlStdOperatorTable}}, because it is part
of the parser/AST, not the function library. (I am a little uncomfortable that
{{SqlBinaryOperator}} depends on {{SqlStdOperatorTable}}, but much less than
{{SqlKind}}.)
# The test suite will tend to keep the list of reversible ops (quite a short
list) in sync.
I am pleased that I reduced the number of methods from 4 to 2. Also I created a
distinction between reversible ops (e.g. {{>}} reverses to {{<}}),
non-reversible ops (e.g. {{LIKE}}) and symmetric ops (e.g. {{=}}), which
reverse to themselves. So, I think this is progress.
> Join on CASE causes AssertionError in RelToSqlConverter
> -------------------------------------------------------
>
> Key: CALCITE-4620
> URL: https://issues.apache.org/jira/browse/CALCITE-4620
> Project: Calcite
> Issue Type: Bug
> Components: jdbc-adapter
> Affects Versions: 1.26.0
> Reporter: Steven Talbot
> Assignee: Julian Hyde
> Priority: Major
> Fix For: 1.27.0
>
>
> Basically CALCITE-4610 but this time with a CASE WHEN.
> I can provide a repro test if needed, but any join with a condition like in
> that same test
> {code:java}
> CASE WHEN a = 'some_literal' THEN true ELSE c = 'some_other_literal' END{code}
> The CASE travels through the pipeline, and the RelToSqlConverter crashes on
> it in convertConditionToSqlNode.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)