[CALCITE-4833] Complex nested correlated subquery failed. - #2571
Conversation
|
You should probably mark this a work in progress until you cleaned it up. |
46a649f to
2a4fb79
Compare
jamesstarr
left a comment
There was a problem hiding this comment.
I think are more generalized approach should be taken. Very few queries will be written in way that this is handled.
| * <a href="https://issues.apache.org/jira/browse/CALCITE-4833">[CALCITE-4833] | ||
| * Complex nested correlated subquery failed</a>. | ||
| */ | ||
| @Test void complexNestedCorrelatedSubquery() { |
There was a problem hiding this comment.
Could you split this up into multiple tests.
| * Complex nested correlated subquery failed</a>. | ||
| */ | ||
| @Test void complexNestedCorrelatedSubquery() { | ||
| String sql = "SELECT t1.empid FROM emps t1 LEFT JOIN emps t2 ON (SELECT t2.empid)<=101"; |
There was a problem hiding this comment.
Could you please rework to join on different tables.
| if (res != null) { | ||
| return res; | ||
| } | ||
| break; |
There was a problem hiding this comment.
We should throw an unsupported operation here.
There was a problem hiding this comment.
why ? we don`t throw it before.
| case GREATER_THAN_OR_EQUAL: | ||
| case EQUALS: | ||
| RexNode res = simplifyOnWithSelectInConditions(expr); | ||
| if (res != null) { |
There was a problem hiding this comment.
On the non expand path, we should be translating this RexSubquery, not doing a simplification of a trivial query.
There was a problem hiding this comment.
thanks ! but i don`t understand your case, can you explain better ?
8a5cf83 to
cf7f71b
Compare
No description provided.