dengzhhu653 commented on code in PR #4959:
URL: https://github.com/apache/hive/pull/4959#discussion_r1505205589
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java:
##########
@@ -1505,14 +1507,9 @@ public void visit(LeafNode node) throws MetaException {
params.add(catName.toLowerCase());
}
tableValue += " then " + tableValue0 + " else null end)";
-
- if (valType == FilterType.Date) {
- tableValue = dbType.toDate(tableValue);
- } else if (valType == FilterType.Timestamp) {
- tableValue = dbType.toTimestamp(tableValue);
- }
}
- if (!node.isReverseOrder) {
+
+ if (!node.isReverseOrder && nodeValue != null) {
Review Comment:
No. As in the result filter, there could be some "?" in the `tableValue`,
```
String filter = node.isReverseOrder
? nodeValue0 + " " + node.operator.getSqlOp() + " " +
tableValue
: tableValue + " " + node.operator.getSqlOp() + " " +
nodeValue0;
```
https://github.com/apache/hive/blob/master/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java#L1502-L1508
We need to place the `nodeValue` at the right position in `params` according
to the `isReverseOrder`
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]