soumyakanti3578 commented on code in PR #5196: URL: https://github.com/apache/hive/pull/5196#discussion_r1941990496
########## ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/ASTConverter.java: ########## @@ -869,6 +875,12 @@ public ASTNode visitInputRef(RexInputRef inputRef) { @Override public ASTNode visitLiteral(RexLiteral literal) { + if (!RexUtil.isNull(literal) && literal.getType().isStruct()) { + return rexBuilder + .makeCall(SqlStdOperatorTable.ROW, (List<? extends RexNode>) literal.getValue()) + .accept(this); + } + Review Comment: It's because in a SEARCH operator, we get Structs in the Sarg instead of ROWs. For example, if you run `query47.q` you'll get the following partial predicate: ``` SEARCH(ROW($6, $8), Sarg[[1999:INTEGER, 12:INTEGER]:RecordType(INTEGER NOT NULL EXPR$0, INTEGER NOT NULL EXPR$1), [2001:INTEGER, 1:INTEGER]:RecordType(INTEGER NOT NULL EXPR$0, INTEGER NOT NULL EXPR$1)]:RecordType(INTEGER NOT NULL EXPR$0, INTEGER NOT NULL EXPR$1)) ``` The left operand is of type ROW, however the values inside Sargs are structs. Earlier with 1.25, those right operands were also of type ROW. -- 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. To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org