[
https://issues.apache.org/jira/browse/IMPALA-9529?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Work on IMPALA-9529 started by Quanlong Huang.
----------------------------------------------
> OR predicates not applied correctly on table masking view
> ---------------------------------------------------------
>
> Key: IMPALA-9529
> URL: https://issues.apache.org/jira/browse/IMPALA-9529
> Project: IMPALA
> Issue Type: Bug
> Reporter: Quanlong Huang
> Assignee: Quanlong Huang
> Priority: Critical
> Labels: correctness
>
> Create a column masking policy on functional_parquet.complextypestbl table:
> id => 100 * id. The following query has incorrect results:
> {code:sql}
> select id, nested_struct.a from functional_parquet.complextypestbl t
> where id = 100 or nested_struct.a = 1;
> +-----+-----------------+
> | id | nested_struct.a |
> +-----+-----------------+
> | 100 | 1 |
> | 200 | NULL |
> | 300 | NULL |
> | 400 | NULL |
> | 500 | NULL |
> | 600 | NULL |
> | 700 | 7 |
> | 800 | -1 |
> +-----+-----------------+
> {code}
> Explaining the query shows somehow the predicates are not assigned:
> {code}
> Query: explain select id, nested_struct.a from
> functional_parquet.complextypestbl t
> where id = 100 or nested_struct.a = 1
> +---------------------------------------------------------------------------------------+
> | Explain String
> |
> +---------------------------------------------------------------------------------------+
> | Max Per-Host Resource Reservation: Memory=16.00KB Threads=3
> |
> | Per-Host Resource Estimates: Memory=32MB
> |
> | WARNING: The following tables are missing relevant table and/or column
> statistics. |
> | functional_parquet.complextypestbl
> |
> | Analyzed query: SELECT id, nested_struct.a FROM (SELECT CAST(CAST(100 AS
> BIGINT) |
> | * id AS BIGINT) id FROM functional_parquet.complextypestbl t) WHERE id =
> |
> | CAST(100 AS BIGINT) OR nested_struct.a = CAST(1 AS INT)
> |
> |
> |
> | F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
> |
> | Per-Host Resources: mem-estimate=57.78KB mem-reservation=0B
> thread-reservation=1 |
> | PLAN-ROOT SINK
> |
> | | output exprs: CAST(CAST(100 AS BIGINT) * id AS BIGINT),
> nested_struct.a |
> | | mem-estimate=0B mem-reservation=0B thread-reservation=0
> |
> | |
> |
> | 01:EXCHANGE [UNPARTITIONED]
> |
> | mem-estimate=57.78KB mem-reservation=0B thread-reservation=0
> |
> | tuple-ids=0 row-size=12B cardinality=4.40K
> |
> | in pipelines: 00(GETNEXT)
> |
> |
> |
> | F00:PLAN FRAGMENT [RANDOM] hosts=2 instances=2
> |
> | Per-Host Resources: mem-estimate=32.00MB mem-reservation=16.00KB
> thread-reservation=2 |
> | DATASTREAM SINK [FRAGMENT=F01, EXCHANGE=01, UNPARTITIONED]
> |
> | | mem-estimate=0B mem-reservation=0B thread-reservation=0
> |
> | 00:SCAN HDFS [functional_parquet.complextypestbl t, RANDOM]
> |
> | HDFS partitions=1/1 files=2 size=6.92KB
> |
> | stored statistics:
> |
> | table: rows=unavailable size=unavailable
> |
> | columns missing stats: id
> |
> | extrapolated-rows=disabled max-scan-range-rows=unavailable
> |
> | mem-estimate=32.00MB mem-reservation=16.00KB thread-reservation=1
> |
> | tuple-ids=0 row-size=12B cardinality=4.40K
> |
> | in pipelines: 00(GETNEXT)
> |
> +---------------------------------------------------------------------------------------+
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]