deniskuzZ commented on code in PR #6179:
URL: https://github.com/apache/hive/pull/6179#discussion_r2564319328
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java:
##########
@@ -1451,24 +1448,69 @@ public static FilterType fromClass(Object value){
@Override
public void visit(LeafNode node) throws MetaException {
- int partColCount = partitionKeys.size();
- int partColIndex = LeafNode.getPartColIndexForFilter(node.keyName,
partitionKeys, filterBuffer);
+ String filter = visitCondition(node.getCondition(), true);
if (filterBuffer.hasError()) {
return;
}
+ filterBuffer.append("(" + filter + ")");
+ }
+
+ @Override
+ public void visit(MultiAndLeafNode node) throws MetaException {
Review Comment:
why not add it then to Calcite rules? it might optimize Hive queries as well
cc @zabetak, @kasakrisz
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java:
##########
@@ -1451,24 +1448,69 @@ public static FilterType fromClass(Object value){
@Override
public void visit(LeafNode node) throws MetaException {
- int partColCount = partitionKeys.size();
- int partColIndex = LeafNode.getPartColIndexForFilter(node.keyName,
partitionKeys, filterBuffer);
+ String filter = visitCondition(node.getCondition(), true);
if (filterBuffer.hasError()) {
return;
}
+ filterBuffer.append("(" + filter + ")");
+ }
+
+ @Override
+ public void visit(MultiAndLeafNode node) throws MetaException {
Review Comment:
why not add it then to Calcite rules? it might optimize Hive queries as well
cc @zabetak, @kasakrisz
--
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]