dengzhhu653 commented on code in PR #4959: URL: https://github.com/apache/hive/pull/4959#discussion_r1462980458
########## standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/parser/PartFilterVisitor.java: ########## @@ -231,25 +229,27 @@ public Long visitIntegerLiteral(PartitionFilterParser.IntegerLiteralContext ctx) } @Override - public Date visitDateLiteral(PartitionFilterParser.DateLiteralContext ctx) { + public String visitDateLiteral(PartitionFilterParser.DateLiteralContext ctx) { PartitionFilterParser.DateContext date = ctx.date(); String dateValue = unquoteString(date.value.getText()); try { - return MetaStoreUtils.convertStringToDate(dateValue); + MetaStoreUtils.convertStringToDate(dateValue); Review Comment: `MetaStoreUtils.convertStringToDate(dateValue)` converts to the date with time zone, it causes trouble when comparing the value both on direct sql or jdo, and as far as I know, there is no way to convert it back to original string, I would prefer to push the convention down into the `TreeVisitor`(i.e, the `JDOFilterGenerator`), converting it to date type if necessary. -- 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