You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Thomas Tauber-Marshall (JIRA)" <ji...@apache.org> on 2017/08/17 21:52:02 UTC
[jira] [Resolved] (IMPALA-5796) CTAS for Kudu table and expr
rewrite analysis exception
[ https://issues.apache.org/jira/browse/IMPALA-5796?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Tauber-Marshall resolved IMPALA-5796.
--------------------------------------------
Resolution: Fixed
Fix Version/s: Impala 2.10.0
commit 5fcc9cb4cc2a9848c7d8ba677494588d8014fa92
Author: Thomas Tauber-Marshall <tm...@cloudera.com>
Date: Mon Aug 14 11:39:03 2017 -0700
IMPALA-5796: CTAS for Kudu fails with expr rewrite
When an expr rewrite occurs, we reanalyze the statement. Some state
that is set in TableDef::analyze() wasn't being reset() first, causing
a failure during reanalysis.
This patch adds TableDef::reset(), which clears the TableDef state
that is set during analyze().
Testing:
- Added a regression test in AnalyzeDDLTest
Change-Id: Ia67bb33736b5a843663b226cdd0fa5bd839cbea1
Reviewed-on: http://gerrit.cloudera.org:8080/7666
Reviewed-by: Thomas Tauber-Marshall <tm...@cloudera.com>
Tested-by: Impala Public Jenkins
> CTAS for Kudu table and expr rewrite analysis exception
> -------------------------------------------------------
>
> Key: IMPALA-5796
> URL: https://issues.apache.org/jira/browse/IMPALA-5796
> Project: IMPALA
> Issue Type: Bug
> Components: Frontend
> Affects Versions: Impala 2.9.0
> Reporter: Matthew Jacobs
> Assignee: Thomas Tauber-Marshall
> Priority: Critical
> Labels: kudu
> Fix For: Impala 2.10.0
>
>
> Creating a Kudu table with a CTAS query containing a WITH clause seems to be broken:
> {code}
> CREATE TABLE not_ok_1
> PRIMARY KEY (int_col)
> PARTITION BY HASH (int_col) PARTITIONS 4
> stored as kudu
> AS with src as (SELECT distinct int_col
> FROM functional.alltypes
> where int_col between 5 and 10)
> select * from src;
> ERROR: AnalysisException: Multiple primary keys specified. Composite primary keys can be specified using the PRIMARY KEY (col1, col2, ...) syntax at the end of the column definition.
> {code}
> I don't think we have any existing tests for CTAS into Kudu tables containing WITH clauses, so I'm not surprised that path is broken.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)