Steve Carlin has posted comments on this change. ( http://gerrit.cloudera.org:8080/21911 )
Change subject: IMPALA-13430: Too many RelNodes created for "IN" literals ...................................................................... Patch Set 3: (2 comments) http://gerrit.cloudera.org:8080/#/c/21911/3//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/21911/3//COMMIT_MSG@13 PS3, Line 13: within one Values RelNode. > For large IN-lists, Calcite supports the LogicalValues relnode (derived fro Interesting, I didn't know that. Filed IMPALA-13439 for this http://gerrit.cloudera.org:8080/#/c/21911/3//COMMIT_MSG@18 PS3, Line 18: limitation prevents the string literal to be of type "string" but : instead is of type "char(x)" > For an IN list which has string literals of different lengths , 'ab', 'abcd Yeah, I actually definitely ran into really bad problems using the default Calcite behavior. I kept trying to initialize StringLiterals with a type of VARCHAR, but it would always revert back to CHAR. Even in the CoerceNodes module. I just couldn't get it to be the right type. I tried instantiating the StringLiteral as a String, but it wouldn't let me do it. So the yucky Project node on top of the Values node was needed to do the casting. Incidentally, if a string literal value is in other places, like a "where" clause, an explicit "CAST" is done during optimization time, thought his gets optimized out when converting to the physical node. When this project becomes more settled, I think we should try for a tighter integration with Calcite because this is the right place for these things to be fixed. I'm not sure what kind of issues they'd have since I think I was told once that the default SQL standard was to create these literals as a CHAR, but that's a fight we can have later on. -- To view, visit http://gerrit.cloudera.org:8080/21911 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ifc3d84c70af9cd4db44359c4ab7f0c9eb70738f5 Gerrit-Change-Number: 21911 Gerrit-PatchSet: 3 Gerrit-Owner: Steve Carlin <[email protected]> Gerrit-Reviewer: Aman Sinha <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Joe McDonnell <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]> Gerrit-Reviewer: Steve Carlin <[email protected]> Gerrit-Comment-Date: Fri, 11 Oct 2024 22:41:24 +0000 Gerrit-HasComments: Yes
