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

Yongzhi Chen commented on IMPALA-6234:
--------------------------------------

I can not reproduce the issue, test the failure cases, all give proper messages:
create table foo (num int) partitioned by( b string);
insert into foo partition(b='abc') values (1);
insert into foo partition(b='def') values (2);

[localhost:21000] default> compute incremental stats foo partition (b != b );   
                                                                                
 
Query: compute incremental stats foo partition (b != b )
+------------------------------------------------------+
| summary                                              |
+------------------------------------------------------+
| No partitions selected for incremental stats update. |
+------------------------------------------------------+
WARNINGS: No partitions selected for incremental stats update

[localhost:21000] default> compute incremental stats foo partition (b = 'ppp');
Query: compute incremental stats foo partition (b = 'ppp')
ERROR: AnalysisException: No matching partition(s) found.

For an empty table:
[localhost:21000] default> compute incremental stats foo2 partition (b = b);    
                                                                                
 
Query: compute incremental stats foo2 partition (b = b)
+-----------------------------------------+
| summary                                 |
+-----------------------------------------+
| Updated 0 partition(s) and 1 column(s). |
+-----------------------------------------+
Fetched 1 row(s) in 0.21s
[localhost:21000] default> compute incremental stats foo2 partition (b != b);   
                                                                                
 
Query: compute incremental stats foo2 partition (b != b)
+-----------------------------------------+
| summary                                 |
+-----------------------------------------+
| Updated 0 partition(s) and 1 column(s). |
+-----------------------------------------+
Fetched 1 row(s) in 0.21s





> COMPUTE INCREMENTAL STATS with partition specs fails if no partition found
> --------------------------------------------------------------------------
>
>                 Key: IMPALA-6234
>                 URL: https://issues.apache.org/jira/browse/IMPALA-6234
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Frontend
>    Affects Versions: Impala 2.8.0, Impala 2.9.0, Impala 2.10.0
>         Environment: Impala-Shell: v2.8.0-cdh5.11.1 (3382c1c) 
> Linux   2.6.32-504.8.1.el6.x86_64 Centos 6
> Impala JDBC: 2.5.29
>            Reporter: Antoni Ivanov
>            Assignee: Yongzhi Chen
>            Priority: Major
>              Labels: newbie
>
> I noticed that if no partition matches the "query" the compute stats fails 
> (and hangs it doesn't get clean up): 
> E.g COMPUTE INCREMENTAL STATS `foo` PARTITION (partition_column != 
> partition_column) - no partition would be matched
> returns the following error:
> AnalysisException: Syntax error in line 1:
> ...M history.astro_ui WHERE () GROUP BY pa__arrival_day, ...
> ^
> Encountered: )
> Expected: CASE, CAST, DEFAULT, EXISTS, FALSE, IF, INTERVAL, NOT, NULL, 
> REPLACE, SELECT, TRUNCATE, TRUE, VALUES, WITH, IDENTIFIER
> CAUSED BY: Exception: Syntax error
> Also when using JDBC Impala Driver the query hangs until the connection is 
> closed (and not just the statement) We are using Impala JBDC version 2.5.29. 
> The query is in state "waiting to be closed" (as seen in Impala Deamon Web UI)
> Note that this behaviour happens only for COMPUTE INCREMENTAL STATS and not 
> for DROP INCREMENTAL STATS. DROP finishes successfully with no issues.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to