[Impala-ASF-CR] IMPALA-6444: CTAS STORED AS KUDU to support reordering of columns

2018-01-30 Thread Pranay Singh (Code Review)
Pranay Singh has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/9147 )

Change subject: IMPALA-6444: CTAS STORED AS KUDU to support reordering of 
columns
..


Patch Set 6:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/9147/5/fe/src/main/java/org/apache/impala/catalog/KuduTable.java
File fe/src/main/java/org/apache/impala/catalog/KuduTable.java:

http://gerrit.cloudera.org:8080/#/c/9147/5/fe/src/main/java/org/apache/impala/catalog/KuduTable.java@391
PS5, Line 391:   public boolean isPrimaryKeyColumn(String name) {
> Thanks for checking. To address this bug I think we should make the followi
Implemented the suggested changes, thanks for detailed explaination


http://gerrit.cloudera.org:8080/#/c/9147/6/fe/src/test/java/org/apache/impala/analysis/AnalyzeDDLTest.java
File fe/src/test/java/org/apache/impala/analysis/AnalyzeDDLTest.java:

http://gerrit.cloudera.org:8080/#/c/9147/6/fe/src/test/java/org/apache/impala/analysis/AnalyzeDDLTest.java@1678
PS6, Line 1678: // CTAS into Kudu tables with primary key specified in 
upper case.
> IMPALA-6444: CTAS into Kudu table with primary key specified in upper case.
Done



--
To view, visit http://gerrit.cloudera.org:8080/9147
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ica1c8ec1544339e9e80733a7a0c78594e0a727d2
Gerrit-Change-Number: 9147
Gerrit-PatchSet: 6
Gerrit-Owner: Pranay Singh
Gerrit-Reviewer: Alex Behm 
Gerrit-Reviewer: Lars Volker 
Gerrit-Reviewer: Pranay Singh
Gerrit-Comment-Date: Wed, 31 Jan 2018 05:18:40 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-6444: CTAS STORED AS KUDU to support reordering of columns

2018-01-29 Thread Pranay Singh (Code Review)
Hello Lars Volker, Alex Behm,

I'd like you to reexamine a change. Please visit

http://gerrit.cloudera.org:8080/9147

to look at the new patch set (#6).

Change subject: IMPALA-6444: CTAS STORED AS KUDU to support reordering of 
columns
..

IMPALA-6444: CTAS STORED AS KUDU to support reordering of columns

In the function KuduTable.isPrimaryKeyColumn() primaryKeyColumnNames_ does not
check for a matching case which causes primaryKeyExprs_ to be empty. This 
causes to
hit an assertion in InsertStmt.prepareExpressions() that generates the exception
reported in the Jira.

The problem is fixed by having an ignoreCase match of the column names.

Testing
---
Verified against the newly added test case that reproduces the issue without 
the fix.

Change-Id: Ica1c8ec1544339e9e80733a7a0c78594e0a727d2
---
M fe/src/main/java/org/apache/impala/catalog/KuduTable.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeDDLTest.java
M testdata/workloads/functional-query/queries/QueryTest/kudu_create.test
3 files changed, 12 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/47/9147/6
--
To view, visit http://gerrit.cloudera.org:8080/9147
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ica1c8ec1544339e9e80733a7a0c78594e0a727d2
Gerrit-Change-Number: 9147
Gerrit-PatchSet: 6
Gerrit-Owner: Pranay Singh
Gerrit-Reviewer: Alex Behm 
Gerrit-Reviewer: Lars Volker 
Gerrit-Reviewer: Pranay Singh


[Impala-ASF-CR] IMPALA-6444: CTAS STORED AS KUDU to support reordering of columns

2018-01-29 Thread Pranay Singh (Code Review)
Pranay Singh has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/9147 )

Change subject: IMPALA-6444: CTAS STORED AS KUDU to support reordering of 
columns
..


Patch Set 5:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/9147/5/fe/src/main/java/org/apache/impala/catalog/KuduTable.java
File fe/src/main/java/org/apache/impala/catalog/KuduTable.java:

http://gerrit.cloudera.org:8080/#/c/9147/5/fe/src/main/java/org/apache/impala/catalog/KuduTable.java@391
PS5, Line 391:   public boolean isPrimaryKeyColumn(String name) {
> Were you able to reproduce the reported issue?
Yes the issue is reproducible without the fix, when the new CTAS test case is 
run it fails.

I checked the code to see how primaryKeyColumnNames_  is being populated it 
appears that there is no explicit conversion to convert it to lower case, it 
seems to be populated by parser. So it is directly taking the case specified by 
the user and comparing it against lower case (Column.getName())

CreateTableAsSelectStmt.analyze (line# 193)
 +--KuduTable.createCtasTarget (line #327)
  -->createStmt_.getTblPrimaryKeyColumnNames()
   -->TableDef.primaryKeyColNames_
  { This in turn seems to be populated by the parser }


http://gerrit.cloudera.org:8080/#/c/9147/5/testdata/workloads/functional-query/queries/QueryTest/kudu_create.test
File testdata/workloads/functional-query/queries/QueryTest/kudu_create.test:

http://gerrit.cloudera.org:8080/#/c/9147/5/testdata/workloads/functional-query/queries/QueryTest/kudu_create.test@292
PS5, Line 292: create table partitioned_kudu_tbl
> Bug was hit in the FE so an Analyzer test in AnalyzeDDL#TestCreateTableAsSe
Moved over the test case to AnalyzeDDLTest.java



--
To view, visit http://gerrit.cloudera.org:8080/9147
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ica1c8ec1544339e9e80733a7a0c78594e0a727d2
Gerrit-Change-Number: 9147
Gerrit-PatchSet: 5
Gerrit-Owner: Pranay Singh
Gerrit-Reviewer: Alex Behm 
Gerrit-Reviewer: Lars Volker 
Gerrit-Reviewer: Pranay Singh
Gerrit-Comment-Date: Tue, 30 Jan 2018 07:05:17 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-6444: CTAS STORED AS KUDU to support reordering of columns

2018-01-29 Thread Alex Behm (Code Review)
Alex Behm has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/9147 )

Change subject: IMPALA-6444: CTAS STORED AS KUDU to support reordering of 
columns
..


Patch Set 5:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/9147/5/fe/src/main/java/org/apache/impala/catalog/KuduTable.java
File fe/src/main/java/org/apache/impala/catalog/KuduTable.java:

http://gerrit.cloudera.org:8080/#/c/9147/5/fe/src/main/java/org/apache/impala/catalog/KuduTable.java@391
PS5, Line 391:   public boolean isPrimaryKeyColumn(String name) {
Were you able to reproduce the reported issue?

I believe that Thomas' recent cleanup should have already fixed this issue (see 
https://gerrit.cloudera.org/#/c/6902/)

* Take a look at how primaryKeyColumnNames_ is populated. Should always be 
lower case.
* Take a look at the callers of isPrimaryKeyColumn(). For example, 
InsertStmt#prepareExpressions() calls this function  passing in a 
Column.getName() which is always lower case (enforced in the Column constructor)

If we are still hitting this issue, there might be a deeper issue that we need 
to investigate.


http://gerrit.cloudera.org:8080/#/c/9147/5/testdata/workloads/functional-query/queries/QueryTest/kudu_create.test
File testdata/workloads/functional-query/queries/QueryTest/kudu_create.test:

http://gerrit.cloudera.org:8080/#/c/9147/5/testdata/workloads/functional-query/queries/QueryTest/kudu_create.test@292
PS5, Line 292: create table partitioned_kudu_tbl
Bug was hit in the FE so an Analyzer test in AnalyzeDDL#TestCreateTableAsSelect 
is more appropriate.



--
To view, visit http://gerrit.cloudera.org:8080/9147
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ica1c8ec1544339e9e80733a7a0c78594e0a727d2
Gerrit-Change-Number: 9147
Gerrit-PatchSet: 5
Gerrit-Owner: Pranay Singh
Gerrit-Reviewer: Alex Behm 
Gerrit-Reviewer: Lars Volker 
Gerrit-Reviewer: Pranay Singh
Gerrit-Comment-Date: Tue, 30 Jan 2018 01:02:41 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-6444: CTAS STORED AS KUDU to support reordering of columns

2018-01-29 Thread Lars Volker (Code Review)
Lars Volker has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/9147 )

Change subject: IMPALA-6444: CTAS STORED AS KUDU to support reordering of 
columns
..


Patch Set 5: Code-Review+1


--
To view, visit http://gerrit.cloudera.org:8080/9147
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ica1c8ec1544339e9e80733a7a0c78594e0a727d2
Gerrit-Change-Number: 9147
Gerrit-PatchSet: 5
Gerrit-Owner: Pranay Singh
Gerrit-Reviewer: Lars Volker 
Gerrit-Reviewer: Pranay Singh
Gerrit-Comment-Date: Tue, 30 Jan 2018 00:37:47 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-6444: CTAS STORED AS KUDU to support reordering of columns

2018-01-29 Thread Pranay Singh (Code Review)
Pranay Singh has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/9147 )

Change subject: IMPALA-6444: CTAS STORED AS KUDU to support reordering of 
columns
..


Patch Set 5:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/9147/4/fe/src/main/java/org/apache/impala/catalog/KuduTable.java
File fe/src/main/java/org/apache/impala/catalog/KuduTable.java:

http://gerrit.cloudera.org:8080/#/c/9147/4/fe/src/main/java/org/apache/impala/catalog/KuduTable.java@393
PS4, Line 393:   if (col.equalsIgnoreCase(name)) return true;
> yes but the first one is a fast path and this one is a slow path so I didn'
Removed the previous check



--
To view, visit http://gerrit.cloudera.org:8080/9147
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ica1c8ec1544339e9e80733a7a0c78594e0a727d2
Gerrit-Change-Number: 9147
Gerrit-PatchSet: 5
Gerrit-Owner: Pranay Singh
Gerrit-Reviewer: Lars Volker 
Gerrit-Reviewer: Pranay Singh
Gerrit-Comment-Date: Mon, 29 Jan 2018 23:52:59 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-6444: CTAS STORED AS KUDU to support reordering of columns

2018-01-29 Thread Pranay Singh (Code Review)
Hello Lars Volker,

I'd like you to reexamine a change. Please visit

http://gerrit.cloudera.org:8080/9147

to look at the new patch set (#5).

Change subject: IMPALA-6444: CTAS STORED AS KUDU to support reordering of 
columns
..

IMPALA-6444: CTAS STORED AS KUDU to support reordering of columns

In the function KuduTable.isPrimaryKeyColumn() primaryKeyColumnNames_ does not
check for a matching case which causes primaryKeyExprs_ to be empty. This 
causes to
hit an assertion in InsertStmt.prepareExpressions() that generates the exception
reported in the Jira.

The problem is fixed by having an ignoreCase match of the column names.

Testing
---
Verified against the newly added test case that reproduces the issue without 
the fix.

Change-Id: Ica1c8ec1544339e9e80733a7a0c78594e0a727d2
---
M fe/src/main/java/org/apache/impala/catalog/KuduTable.java
M testdata/workloads/functional-query/queries/QueryTest/kudu_create.test
2 files changed, 24 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/47/9147/5
--
To view, visit http://gerrit.cloudera.org:8080/9147
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ica1c8ec1544339e9e80733a7a0c78594e0a727d2
Gerrit-Change-Number: 9147
Gerrit-PatchSet: 5
Gerrit-Owner: Pranay Singh
Gerrit-Reviewer: Lars Volker 
Gerrit-Reviewer: Pranay Singh


[Impala-ASF-CR] IMPALA-6444: CTAS STORED AS KUDU to support reordering of columns

2018-01-29 Thread Pranay Singh (Code Review)
Pranay Singh has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/9147 )

Change subject: IMPALA-6444: CTAS STORED AS KUDU to support reordering of 
columns
..


Patch Set 4:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/9147/4/fe/src/main/java/org/apache/impala/catalog/KuduTable.java
File fe/src/main/java/org/apache/impala/catalog/KuduTable.java:

http://gerrit.cloudera.org:8080/#/c/9147/4/fe/src/main/java/org/apache/impala/catalog/KuduTable.java@393
PS4, Line 393: if (!result) {
> Sorry for the late addition. I think the first check is not needed anymore.
yes but the first one is a fast path and this one is a slow path so I didn't 
remove the former check



--
To view, visit http://gerrit.cloudera.org:8080/9147
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ica1c8ec1544339e9e80733a7a0c78594e0a727d2
Gerrit-Change-Number: 9147
Gerrit-PatchSet: 4
Gerrit-Owner: Pranay Singh
Gerrit-Reviewer: Lars Volker 
Gerrit-Reviewer: Pranay Singh
Gerrit-Comment-Date: Mon, 29 Jan 2018 23:46:05 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-6444: CTAS STORED AS KUDU to support reordering of columns

2018-01-29 Thread Lars Volker (Code Review)
Lars Volker has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/9147 )

Change subject: IMPALA-6444: CTAS STORED AS KUDU to support reordering of 
columns
..


Patch Set 4:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/9147/4/fe/src/main/java/org/apache/impala/catalog/KuduTable.java
File fe/src/main/java/org/apache/impala/catalog/KuduTable.java:

http://gerrit.cloudera.org:8080/#/c/9147/4/fe/src/main/java/org/apache/impala/catalog/KuduTable.java@393
PS4, Line 393: if (!result) {
Sorry for the late addition. I think the first check is not needed anymore. 
Consider:

  for (String col : primaryKeyColumnNames_) {
if (col.equalsIgnoreCase(name)) return true;
  }
  return false;

Wouldn't this handle matching cases, too?



--
To view, visit http://gerrit.cloudera.org:8080/9147
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ica1c8ec1544339e9e80733a7a0c78594e0a727d2
Gerrit-Change-Number: 9147
Gerrit-PatchSet: 4
Gerrit-Owner: Pranay Singh
Gerrit-Reviewer: Lars Volker 
Gerrit-Reviewer: Pranay Singh
Gerrit-Comment-Date: Mon, 29 Jan 2018 23:13:54 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-6444: CTAS STORED AS KUDU to support reordering of columns

2018-01-29 Thread Pranay Singh (Code Review)
Pranay Singh has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/9147 )

Change subject: IMPALA-6444: CTAS STORED AS KUDU to support reordering of 
columns
..


Patch Set 3:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/9147/2//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/9147/2//COMMIT_MSG@12
PS2, Line 12: j
> nit: Jira
Done


http://gerrit.cloudera.org:8080/#/c/9147/2//COMMIT_MSG@16
PS2, Line 16:  Testing
> nit: remove the indent here
Done


http://gerrit.cloudera.org:8080/#/c/9147/2/fe/src/main/java/org/apache/impala/catalog/KuduTable.java
File fe/src/main/java/org/apache/impala/catalog/KuduTable.java:

http://gerrit.cloudera.org:8080/#/c/9147/2/fe/src/main/java/org/apache/impala/catalog/KuduTable.java@396
PS2, Line 396:   return true;
> nit: if and return could go on a single line now
Done



--
To view, visit http://gerrit.cloudera.org:8080/9147
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ica1c8ec1544339e9e80733a7a0c78594e0a727d2
Gerrit-Change-Number: 9147
Gerrit-PatchSet: 3
Gerrit-Owner: Pranay Singh
Gerrit-Reviewer: Lars Volker 
Gerrit-Reviewer: Pranay Singh
Gerrit-Comment-Date: Mon, 29 Jan 2018 23:10:03 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-6444: CTAS STORED AS KUDU to support reordering of columns

2018-01-29 Thread Pranay Singh (Code Review)
Hello Lars Volker,

I'd like you to reexamine a change. Please visit

http://gerrit.cloudera.org:8080/9147

to look at the new patch set (#4).

Change subject: IMPALA-6444: CTAS STORED AS KUDU to support reordering of 
columns
..

IMPALA-6444: CTAS STORED AS KUDU to support reordering of columns

In the function KuduTable.isPrimaryKeyColumn() primaryKeyColumnNames_ does not
check for a matching case which causes primaryKeyExprs_ to be empty. This 
causes to
hit an assertion in InsertStmt.prepareExpressions() that generates the exception
reported in the Jira.

The problem is fixed by having an ignoreCase match of the column names.

Testing
---
Verified against the newly added test case that reproduces the issue without 
the fix.

Change-Id: Ica1c8ec1544339e9e80733a7a0c78594e0a727d2
---
M fe/src/main/java/org/apache/impala/catalog/KuduTable.java
M testdata/workloads/functional-query/queries/QueryTest/kudu_create.test
2 files changed, 27 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/47/9147/4
--
To view, visit http://gerrit.cloudera.org:8080/9147
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ica1c8ec1544339e9e80733a7a0c78594e0a727d2
Gerrit-Change-Number: 9147
Gerrit-PatchSet: 4
Gerrit-Owner: Pranay Singh
Gerrit-Reviewer: Lars Volker 
Gerrit-Reviewer: Pranay Singh


[Impala-ASF-CR] IMPALA-6444: CTAS STORED AS KUDU to support reordering of columns

2018-01-29 Thread Pranay Singh (Code Review)
Hello Lars Volker,

I'd like you to reexamine a change. Please visit

http://gerrit.cloudera.org:8080/9147

to look at the new patch set (#3).

Change subject: IMPALA-6444: CTAS STORED AS KUDU to support reordering of 
columns
..

IMPALA-6444: CTAS STORED AS KUDU to support reordering of columns

In the function KuduTable.isPrimaryKeyColumn() primaryKeyColumnNames_ does not
check for a matching case which causes primaryKeyExprs_ to be empty. This 
causes to
hit an assertion in InsertStmt.prepareExpressions() that generates the exception
reported in the jira.

The problem is fixed by having an ignoreCase match of the column names.

 Testing
 ---
 Verified against the newly added test case that reproduces the issue without 
the fix.

Change-Id: Ica1c8ec1544339e9e80733a7a0c78594e0a727d2
---
M fe/src/main/java/org/apache/impala/catalog/KuduTable.java
M testdata/workloads/functional-query/queries/QueryTest/kudu_create.test
2 files changed, 29 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/47/9147/3
--
To view, visit http://gerrit.cloudera.org:8080/9147
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ica1c8ec1544339e9e80733a7a0c78594e0a727d2
Gerrit-Change-Number: 9147
Gerrit-PatchSet: 3
Gerrit-Owner: Pranay Singh
Gerrit-Reviewer: Lars Volker 
Gerrit-Reviewer: Pranay Singh


[Impala-ASF-CR] IMPALA-6444: CTAS STORED AS KUDU to support reordering of columns

2018-01-29 Thread Lars Volker (Code Review)
Lars Volker has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/9147 )

Change subject: IMPALA-6444: CTAS STORED AS KUDU to support reordering of 
columns
..


Patch Set 2: Code-Review+1

(3 comments)

http://gerrit.cloudera.org:8080/#/c/9147/2//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/9147/2//COMMIT_MSG@12
PS2, Line 12: j
nit: Jira


http://gerrit.cloudera.org:8080/#/c/9147/2//COMMIT_MSG@16
PS2, Line 16:  Testing
nit: remove the indent here


http://gerrit.cloudera.org:8080/#/c/9147/2/fe/src/main/java/org/apache/impala/catalog/KuduTable.java
File fe/src/main/java/org/apache/impala/catalog/KuduTable.java:

http://gerrit.cloudera.org:8080/#/c/9147/2/fe/src/main/java/org/apache/impala/catalog/KuduTable.java@396
PS2, Line 396:   return true;
nit: if and return could go on a single line now



--
To view, visit http://gerrit.cloudera.org:8080/9147
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ica1c8ec1544339e9e80733a7a0c78594e0a727d2
Gerrit-Change-Number: 9147
Gerrit-PatchSet: 2
Gerrit-Owner: Pranay Singh
Gerrit-Reviewer: Lars Volker 
Gerrit-Reviewer: Pranay Singh
Gerrit-Comment-Date: Mon, 29 Jan 2018 23:01:16 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-6444: CTAS STORED AS KUDU to support reordering of columns

2018-01-29 Thread Pranay Singh (Code Review)
Hello Lars Volker,

I'd like you to reexamine a change. Please visit

http://gerrit.cloudera.org:8080/9147

to look at the new patch set (#2).

Change subject: IMPALA-6444: CTAS STORED AS KUDU to support reordering of 
columns
..

IMPALA-6444: CTAS STORED AS KUDU to support reordering of columns

In the function KuduTable.isPrimaryKeyColumn() primaryKeyColumnNames_ does not
check for a matching case which causes primaryKeyExprs_ to be empty. This 
causes to
hit an assertion in InsertStmt.prepareExpressions() that generates the exception
reported in the jira.

The problem is fixed by having an ignoreCase match of the column names.

 Testing
 ---
 Verified against the newly added test case that reproduces the issue without 
the fix.

Change-Id: Ica1c8ec1544339e9e80733a7a0c78594e0a727d2
---
M fe/src/main/java/org/apache/impala/catalog/KuduTable.java
M testdata/workloads/functional-query/queries/QueryTest/kudu_create.test
2 files changed, 32 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/47/9147/2
--
To view, visit http://gerrit.cloudera.org:8080/9147
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ica1c8ec1544339e9e80733a7a0c78594e0a727d2
Gerrit-Change-Number: 9147
Gerrit-PatchSet: 2
Gerrit-Owner: Pranay Singh
Gerrit-Reviewer: Lars Volker 
Gerrit-Reviewer: Pranay Singh