You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Matthew Jacobs (Code Review)" <ge...@cloudera.org> on 2017/08/03 23:20:24 UTC

[Impala-ASF-CR] IMPALA-5757: Make tbl property toSql deterministic

Matthew Jacobs has uploaded a new change for review.

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

Change subject: IMPALA-5757: Make tbl property toSql deterministic
......................................................................

IMPALA-5757: Make tbl property toSql deterministic

On Ubuntu 16.04, it seems that table properties may be
returned in a different order from that expected by
TestShowCreateTable in test_kudu.py.

The fix is to change ToSqlUtils to print properties in
a deterministic way.

Change-Id: I2391e04eb40e398098704b77588ad352d514df7d
---
M fe/src/main/java/org/apache/impala/analysis/ToSqlUtils.java
1 file changed, 12 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/80/7580/1
-- 
To view, visit http://gerrit.cloudera.org:8080/7580
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2391e04eb40e398098704b77588ad352d514df7d
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Matthew Jacobs <mj...@cloudera.com>

[Impala-ASF-CR] IMPALA-5757: Make tbl property toSql deterministic

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change.

Change subject: IMPALA-5757: Make tbl property toSql deterministic
......................................................................


Patch Set 2:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/985/

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2391e04eb40e398098704b77588ad352d514df7d
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins
Gerrit-Reviewer: Jim Apple <jb...@apache.org>
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-5757: Make tbl property toSql deterministic

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change.

Change subject: IMPALA-5757: Make tbl property toSql deterministic
......................................................................


Patch Set 1:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/982/

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2391e04eb40e398098704b77588ad352d514df7d
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins
Gerrit-Reviewer: Jim Apple <jb...@apache.org>
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-5757: Make tbl property toSql deterministic

Posted by "Jim Apple (Code Review)" <ge...@cloudera.org>.
Jim Apple has posted comments on this change.

Change subject: IMPALA-5757: Make tbl property toSql deterministic
......................................................................


Patch Set 1: Code-Review+2

> > > Didn't find any test cases that needed to be updated when I ran
 > > the
 > > > tests I was aware of using show create table. Possibly I missed
 > > > some, but will run a jenkins job.
 > >
 > > I'm surprised: it seems like kudu.master_addresses would sort
 > > before kudu.table_name
 > 
 > Agreed, but that's the order in the expected string:
 > 
 > 
 > props = "'kudu.table_name'='%s'" % kudu_table
 > self.assert_show_create_equals(cursor,
 > """
 > CREATE TABLE {{table}} (c INT PRIMARY KEY)
 > PARTITION BY HASH (c) PARTITIONS 3
 > STORED AS KUDU
 > TBLPROPERTIES ({props})""".format(props=props),
 > """
 > CREATE TABLE {db}.{{table}} (
 > c INT NOT NULL ENCODING AUTO_ENCODING COMPRESSION DEFAULT_COMPRESSION,
 > PRIMARY KEY (c)
 > )
 > PARTITION BY HASH (c) PARTITIONS 3
 > STORED AS KUDU
 > TBLPROPERTIES ('kudu.master_addresses'='{kudu_addr}',
 > {props})""".format(

Ah, I mixed up expected and actual

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2391e04eb40e398098704b77588ad352d514df7d
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Jim Apple <jb...@apache.org>
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-5757: Make tbl property toSql deterministic

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has submitted this change and it was merged.

Change subject: IMPALA-5757: Make tbl property toSql deterministic
......................................................................


IMPALA-5757: Make tbl property toSql deterministic

On Ubuntu 16.04, it seems that table properties may be
returned in a different order from that expected by
TestShowCreateTable in test_kudu.py.

The fix is to change ToSqlUtils to print properties in
a deterministic way.

Change-Id: I2391e04eb40e398098704b77588ad352d514df7d
Reviewed-on: http://gerrit.cloudera.org:8080/7580
Reviewed-by: Matthew Jacobs <mj...@cloudera.com>
Tested-by: Impala Public Jenkins
---
M fe/src/main/java/org/apache/impala/analysis/ToSqlUtils.java
M fe/src/test/java/org/apache/impala/analysis/ToSqlTest.java
2 files changed, 16 insertions(+), 6 deletions(-)

Approvals:
  Impala Public Jenkins: Verified
  Matthew Jacobs: Looks good to me, approved



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2391e04eb40e398098704b77588ad352d514df7d
Gerrit-PatchSet: 3
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins
Gerrit-Reviewer: Jim Apple <jb...@apache.org>
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>

[Impala-ASF-CR] IMPALA-5757: Make tbl property toSql deterministic

Posted by "Matthew Jacobs (Code Review)" <ge...@cloudera.org>.
Hello Impala Public Jenkins, Jim Apple,

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

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

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

Change subject: IMPALA-5757: Make tbl property toSql deterministic
......................................................................

IMPALA-5757: Make tbl property toSql deterministic

On Ubuntu 16.04, it seems that table properties may be
returned in a different order from that expected by
TestShowCreateTable in test_kudu.py.

The fix is to change ToSqlUtils to print properties in
a deterministic way.

Change-Id: I2391e04eb40e398098704b77588ad352d514df7d
---
M fe/src/main/java/org/apache/impala/analysis/ToSqlUtils.java
M fe/src/test/java/org/apache/impala/analysis/ToSqlTest.java
2 files changed, 16 insertions(+), 6 deletions(-)


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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2391e04eb40e398098704b77588ad352d514df7d
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins
Gerrit-Reviewer: Jim Apple <jb...@apache.org>
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>

[Impala-ASF-CR] IMPALA-5757: Make tbl property toSql deterministic

Posted by "Matthew Jacobs (Code Review)" <ge...@cloudera.org>.
Matthew Jacobs has posted comments on this change.

Change subject: IMPALA-5757: Make tbl property toSql deterministic
......................................................................


Patch Set 2: Code-Review+2

I only ran backend tests locally so I missed ToSqlTest. Updated in ps2.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2391e04eb40e398098704b77588ad352d514df7d
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins
Gerrit-Reviewer: Jim Apple <jb...@apache.org>
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-5757: Make tbl property toSql deterministic

Posted by "Matthew Jacobs (Code Review)" <ge...@cloudera.org>.
Matthew Jacobs has posted comments on this change.

Change subject: IMPALA-5757: Make tbl property toSql deterministic
......................................................................


Patch Set 1:

> > Didn't find any test cases that needed to be updated when I ran
 > the
 > > tests I was aware of using show create table. Possibly I missed
 > > some, but will run a jenkins job.
 > 
 > I'm surprised: it seems like kudu.master_addresses would sort
 > before kudu.table_name

Agreed, but that's the order in the expected string:


    props = "'kudu.table_name'='%s'" % kudu_table
    self.assert_show_create_equals(cursor,
        """
        CREATE TABLE {{table}} (c INT PRIMARY KEY)
        PARTITION BY HASH (c) PARTITIONS 3
        STORED AS KUDU
        TBLPROPERTIES ({props})""".format(props=props),
        """
        CREATE TABLE {db}.{{table}} (
          c INT NOT NULL ENCODING AUTO_ENCODING COMPRESSION DEFAULT_COMPRESSION,
          PRIMARY KEY (c)
        )
        PARTITION BY HASH (c) PARTITIONS 3
        STORED AS KUDU
        TBLPROPERTIES ('kudu.master_addresses'='{kudu_addr}', {props})""".format(

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2391e04eb40e398098704b77588ad352d514df7d
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Jim Apple <jb...@apache.org>
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-5757: Make tbl property toSql deterministic

Posted by "Matthew Jacobs (Code Review)" <ge...@cloudera.org>.
Matthew Jacobs has posted comments on this change.

Change subject: IMPALA-5757: Make tbl property toSql deterministic
......................................................................


Patch Set 1:

Previous job failed with flaky data load. I filed IMPALA-5765

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2391e04eb40e398098704b77588ad352d514df7d
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins
Gerrit-Reviewer: Jim Apple <jb...@apache.org>
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-5757: Make tbl property toSql deterministic

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change.

Change subject: IMPALA-5757: Make tbl property toSql deterministic
......................................................................


Patch Set 1: Verified-1

Build failed: https://jenkins.impala.io/job/gerrit-verify-dryrun/982/

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2391e04eb40e398098704b77588ad352d514df7d
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins
Gerrit-Reviewer: Jim Apple <jb...@apache.org>
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-5757: Make tbl property toSql deterministic

Posted by "Matthew Jacobs (Code Review)" <ge...@cloudera.org>.
Matthew Jacobs has posted comments on this change.

Change subject: IMPALA-5757: Make tbl property toSql deterministic
......................................................................


Patch Set 1:

Didn't find any test cases that needed to be updated when I ran the tests I was aware of using show create table. Possibly I missed some, but will run a jenkins job.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2391e04eb40e398098704b77588ad352d514df7d
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-5757: Make tbl property toSql deterministic

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change.

Change subject: IMPALA-5757: Make tbl property toSql deterministic
......................................................................


Patch Set 1:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/984/

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2391e04eb40e398098704b77588ad352d514df7d
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins
Gerrit-Reviewer: Jim Apple <jb...@apache.org>
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-5757: Make tbl property toSql deterministic

Posted by "Jim Apple (Code Review)" <ge...@cloudera.org>.
Jim Apple has posted comments on this change.

Change subject: IMPALA-5757: Make tbl property toSql deterministic
......................................................................


Patch Set 1:

> Didn't find any test cases that needed to be updated when I ran the
 > tests I was aware of using show create table. Possibly I missed
 > some, but will run a jenkins job.

I'm surprised: it seems like kudu.master_addresses would sort before kudu.table_name

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2391e04eb40e398098704b77588ad352d514df7d
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Jim Apple <jb...@apache.org>
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-5757: Make tbl property toSql deterministic

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change.

Change subject: IMPALA-5757: Make tbl property toSql deterministic
......................................................................


Patch Set 1:

Build failed: https://jenkins.impala.io/job/gerrit-verify-dryrun/984/

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2391e04eb40e398098704b77588ad352d514df7d
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins
Gerrit-Reviewer: Jim Apple <jb...@apache.org>
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-5757: Make tbl property toSql deterministic

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change.

Change subject: IMPALA-5757: Make tbl property toSql deterministic
......................................................................


Patch Set 2: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2391e04eb40e398098704b77588ad352d514df7d
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins
Gerrit-Reviewer: Jim Apple <jb...@apache.org>
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-HasComments: No