You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Gopal V (JIRA)" <ji...@apache.org> on 2018/10/16 05:46:00 UTC
[jira] [Created] (HIVE-20749) Constraints: Null scan optimizer does
not remove entire TableScan
Gopal V created HIVE-20749:
------------------------------
Summary: Constraints: Null scan optimizer does not remove entire TableScan
Key: HIVE-20749
URL: https://issues.apache.org/jira/browse/HIVE-20749
Project: Hive
Issue Type: Bug
Components: CBO, Logical Optimizer
Reporter: Gopal V
With PK constraints on store table, the following query fails to remove the entire join (and cut the query short).
{code}
explain select count(1) from store_sales, store where ss_store_sk = s_store_sk and s_store_sk is null and ss_sold_date_sk between 2450816 and 2450816+365;
{code}
Calcite generates the following optimized query, but the NullScan optimizer does not kick in for the query.
{code}
SELECT COUNT(*) AS `$f0`
FROM (SELECT *
FROM (SELECT 0 AS `DUMMY`
FROM `tpcds_bin_partitioned_orc_10000`.`store_sales`) AS `t`
WHERE FALSE) AS `t0`,
(SELECT *
FROM (SELECT 0 AS `DUMMY`
FROM `tpcds_bin_partitioned_orc_10000`.`store`) AS `t1`
WHERE FALSE) AS `t2`
{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)