Hi

In hive metastore MetaStoreDirectSql#generateSqlFilter() API, it will not
push down the query to the RDBMS when partition colType != valType, but
will instead get all PARTITIONS.PART_NAME of the hive table then filter it
according to the hql Expression.

here code :

https://github.com/apache/hive/blob/519a3c9e748af12cf781b8ef27e687fab5dab5fb/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java#L1316


In our case , it will cause increasing CPU IO_WAIT and affect performance
even service is not available.

Because we create table with partition filed (dt string) , but always using
hql like : "select * from xxx where dt=20220101;"

So may equivalence Predicate should pushed down to metastore query?


I have updated the gist (https://github.com/apache/hive/pull/2947). Please
let me know if there are any additional questions.

Reply via email to