[ https://issues.apache.org/jira/browse/HIVE-10122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14384874#comment-14384874 ]
Mostafa Mokhtar commented on HIVE-10122: ---------------------------------------- [~sershe] [~thejas] [~hagleitn] I ran explain for this query {code} select ss_item_sk rowcount from store_sales where ss_sold_date_sk between 2450816 and 2450817 and ss_ticket_number > 100000000 and ss_item_sk > 50; {code} And the query that gets issues to MySQL looks correct to me as only the qualified partitions are queried. What am I missing? {code} select COLUMN_NAME, COLUMN_TYPE, min(LONG_LOW_VALUE), max(LONG_HIGH_VALUE), min(DOUBLE_LOW_VALUE), max(DOUBLE_HIGH_VALUE), min(BIG_DECIMAL_LOW_VALUE), max(BIG_DECIMAL_HIGH_VALUE), sum(NUM_NULLS), max(NUM_DISTINCTS), max(AVG_COL_LEN), max(MAX_COL_LEN), sum(NUM_TRUES), sum(NUM_FALSES) from PART_COL_STATS where DB_NAME = 'tpcds_bin_partitioned_orc_30000' and TABLE_NAME = 'store_sales' and COLUMN_NAME in ('ss_item_sk' , 'ss_ticket_number') and PARTITION_NAME in ('ss_sold_date_sk=2450816' , 'ss_sold_date_sk=2450817') group by COLUMN_NAME , COLUMN_TYPE {code} > Hive metastore filter-by-expression is broken for non-partition expressions > --------------------------------------------------------------------------- > > Key: HIVE-10122 > URL: https://issues.apache.org/jira/browse/HIVE-10122 > Project: Hive > Issue Type: Bug > Components: Metastore > Affects Versions: 0.14.0, 1.0.0, 1.1.0 > Reporter: Sergey Shelukhin > > See > https://issues.apache.org/jira/browse/HIVE-10091?focusedCommentId=14382413&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14382413 > These two lines of code > {noformat} > // Replace virtual columns with nulls. See javadoc for details. > prunerExpr = removeNonPartCols(prunerExpr, extractPartColNames(tab), > partColsUsedInFilter); > // Remove all parts that are not partition columns. See javadoc for > details. > ExprNodeDesc compactExpr = compactExpr(prunerExpr.clone()); > {noformat} > are supposed to take care of this; I see there were bunch of changes to this > code over some time, and now it appears to be broken. > Thanks to [~thejas] for info. -- This message was sent by Atlassian JIRA (v6.3.4#6332)