You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2020/03/09 07:39:00 UTC

[jira] [Commented] (IMPALA-7784) Partition pruning handles escaped strings incorrectly

    [ https://issues.apache.org/jira/browse/IMPALA-7784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17054721#comment-17054721 ] 

ASF subversion and git services commented on IMPALA-7784:
---------------------------------------------------------

Commit 9672d945963e1ca3c8699340f92d7d6ce1d91c9f in impala's branch refs/heads/master from stiga-huang
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=9672d94 ]

IMPALA-7784: Use unescaped string in partition pruning + fix duplicatedly unescaping strings

String values from external systems (HDFS, Hive, Kudu, etc.) are already
unescaped, the same as string values in Thrift objects deserialized in
coordinators. We should mark needsUnescaping_ as false in creating
StringLiterals for these values (in LiteralExpr#create()).

When comparing StringLiterals in partition pruning, we should also use
the unescaped values if needsUnescaping_ is true.

Tests:
 - Add tests for partition pruning on unescaped strings.
 - Add test coverage for all existing code paths using
   LiteralExpr#create().
 - Run core tests

Change-Id: Iea8070f16a74f9aeade294504f2834abb8b3b38f
Reviewed-on: http://gerrit.cloudera.org:8080/15278
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>


> Partition pruning handles escaped strings incorrectly
> -----------------------------------------------------
>
>                 Key: IMPALA-7784
>                 URL: https://issues.apache.org/jira/browse/IMPALA-7784
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Frontend
>    Affects Versions: Impala 3.0
>            Reporter: Csaba Ringhofer
>            Assignee: Quanlong Huang
>            Priority: Critical
>              Labels: correctness
>
> Repro:
> {code}
> create table tpart (i int) partitioned by (p string)
> insert into tpart partition (p="\"") values (1);
> select  * from tpart where p = "\"";
> Result;
> Fetched 0 row(s)
> select  * from tpart where p = '"';
> Result:
> 1,""""
> {code}
> Hive returns the row for both queries.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org