You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Wang Xixu (Code Review)" <ge...@cloudera.org> on 2024/08/02 08:21:33 UTC

[kudu-CR] [Tool] CLI table copy creats a table with no range partition

Wang Xixu has uploaded this change for review. ( http://gerrit.cloudera.org:8080/21634


Change subject: [Tool] CLI table copy creats a table with no range partition
......................................................................

[Tool] CLI table copy creats a table with no range partition

Currently, using CLI 'table copy' to create a destination table
when the source table without any range partition, it creates
a table with an unbouned range partition. That make the source
table schema is different with the destination table's. That
also causes the tablet schema different in the same partition.
The following is an example:
The source table schema:
TABLE test1 (
    key INT32 NOT NULL,
    int_val INT32 NOT NULL,
    string_val STRING NULLABLE,
    PRIMARY KEY (key)
)
OWNER root
REPLICAS 1
COMMENT

CLI command:
'kudu table copy $ma test1 $ma --create_table=true'

The destination table schema:
TABLE test1 (
    key INT32 NOT NULL,
    int_val INT32 NOT NULL,
    string_val STRING NULLABLE,
    PRIMARY KEY (key)
)
RANGE (key) (
    PARTITION UNBOUNDED
)
OWNER root
REPLICAS 1
COMMENT

In semantics, it is right. But is better to keep the source table
schema the same with the destination schema. In our company, there
is a tool that copy a table to another cluster in file copying
method, which is more quick than CLI 'kudu table copy' in row
copying method. It needs to keep the table schema the same.

Change-Id: I94f99f845393ff2460761cc7bd82ecb3f3ead79b
---
M src/kudu/tools/kudu-tool-test.cc
M src/kudu/tools/table_scanner.cc
2 files changed, 105 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/34/21634/1
-- 
To view, visit http://gerrit.cloudera.org:8080/21634
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I94f99f845393ff2460761cc7bd82ecb3f3ead79b
Gerrit-Change-Number: 21634
Gerrit-PatchSet: 1
Gerrit-Owner: Wang Xixu <14...@qq.com>

[kudu-CR] Table copy supports creating a table with no range partition

Posted by "Marton Greber (Code Review)" <ge...@cloudera.org>.
Marton Greber has posted comments on this change. ( http://gerrit.cloudera.org:8080/21634 )

Change subject: Table copy supports creating a table with no range partition
......................................................................


Patch Set 4:

Looks good to me, thank you for working on this!
Just make sure I re-triggered the Jenkins verifications.
Afterwards I'm fine with submitting this patch!
Thanks!


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I94f99f845393ff2460761cc7bd82ecb3f3ead79b
Gerrit-Change-Number: 21634
Gerrit-PatchSet: 4
Gerrit-Owner: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Fri, 06 Sep 2024 18:29:37 +0000
Gerrit-HasComments: No

[kudu-CR] Table copy supports creating a table with no range partition

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/21634 )

Change subject: Table copy supports creating a table with no range partition
......................................................................


Patch Set 4: Verified-1

Build Failed 

http://jenkins.kudu.apache.org/job/pre_commit/473/ : FAILURE


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I94f99f845393ff2460761cc7bd82ecb3f3ead79b
Gerrit-Change-Number: 21634
Gerrit-PatchSet: 4
Gerrit-Owner: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Fri, 06 Sep 2024 21:12:36 +0000
Gerrit-HasComments: No

[kudu-CR] Table copy supports creating a table with no range partition

Posted by "Marton Greber (Code Review)" <ge...@cloudera.org>.
Marton Greber has posted comments on this change. ( http://gerrit.cloudera.org:8080/21634 )

Change subject: Table copy supports creating a table with no range partition
......................................................................


Patch Set 4: Code-Review+1


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I94f99f845393ff2460761cc7bd82ecb3f3ead79b
Gerrit-Change-Number: 21634
Gerrit-PatchSet: 4
Gerrit-Owner: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Mon, 09 Sep 2024 10:42:48 +0000
Gerrit-HasComments: No

[kudu-CR] Table copy supports creating a table with no range partition

Posted by "Mahesh Reddy (Code Review)" <ge...@cloudera.org>.
Mahesh Reddy has posted comments on this change. ( http://gerrit.cloudera.org:8080/21634 )

Change subject: Table copy supports creating a table with no range partition
......................................................................


Patch Set 2:

(3 comments)

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

http://gerrit.cloudera.org:8080/#/c/21634/2//COMMIT_MSG@11
PS2, Line 11: unbouned 
nit: unbounded


http://gerrit.cloudera.org:8080/#/c/21634/2/src/kudu/tools/kudu-tool-test.cc
File src/kudu/tools/kudu-tool-test.cc:

http://gerrit.cloudera.org:8080/#/c/21634/2/src/kudu/tools/kudu-tool-test.cc@1870
PS2, Line 1870: Except that they have different table name, they schemas are the same.
nit: Other than the table names, the schemas are the same.


http://gerrit.cloudera.org:8080/#/c/21634/2/src/kudu/tools/kudu-tool-test.cc@1871
PS2, Line 1871: Therefore
nit: add comma after Therefore



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I94f99f845393ff2460761cc7bd82ecb3f3ead79b
Gerrit-Change-Number: 21634
Gerrit-PatchSet: 2
Gerrit-Owner: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Fri, 16 Aug 2024 18:08:42 +0000
Gerrit-HasComments: Yes

[kudu-CR] Table copy supports creating a table with no range partition

Posted by "Wang Xixu (Code Review)" <ge...@cloudera.org>.
Wang Xixu has posted comments on this change. ( http://gerrit.cloudera.org:8080/21634 )

Change subject: Table copy supports creating a table with no range partition
......................................................................


Patch Set 3:

(4 comments)

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

http://gerrit.cloudera.org:8080/#/c/21634/2//COMMIT_MSG@11
PS2, Line 11: unbounded
> nit: unbounded
Done


http://gerrit.cloudera.org:8080/#/c/21634/2//COMMIT_MSG@43
PS2, Line 43: Semantically it is right, but is 
> Semantically it's right, but it is better to keep the source table schema t
Done


http://gerrit.cloudera.org:8080/#/c/21634/2/src/kudu/tools/kudu-tool-test.cc
File src/kudu/tools/kudu-tool-test.cc:

http://gerrit.cloudera.org:8080/#/c/21634/2/src/kudu/tools/kudu-tool-test.cc@1870
PS2, Line 1870: Other than the table names, the schemas are the same.
> nit: Other than the table names, the schemas are the same.
Done


http://gerrit.cloudera.org:8080/#/c/21634/2/src/kudu/tools/kudu-tool-test.cc@1871
PS2, Line 1871: Therefore
> nit: add comma after Therefore
Done. Thanks for your comments.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I94f99f845393ff2460761cc7bd82ecb3f3ead79b
Gerrit-Change-Number: 21634
Gerrit-PatchSet: 3
Gerrit-Owner: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Wed, 21 Aug 2024 07:14:07 +0000
Gerrit-HasComments: Yes

[kudu-CR] Table copy supports creating a table with no range partition

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/21634 )

Change subject: Table copy supports creating a table with no range partition
......................................................................


Patch Set 3:

Build Started http://jenkins.kudu.apache.org/job/pre_commit/442/


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I94f99f845393ff2460761cc7bd82ecb3f3ead79b
Gerrit-Change-Number: 21634
Gerrit-PatchSet: 3
Gerrit-Owner: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Wed, 21 Aug 2024 07:13:49 +0000
Gerrit-HasComments: No

[kudu-CR] Table copy supports creating a table with no range partition

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/21634 )

Change subject: Table copy supports creating a table with no range partition
......................................................................


Patch Set 2: Verified-1

Build Failed 

http://jenkins.kudu.apache.org/job/pre_commit/398/ : FAILURE


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I94f99f845393ff2460761cc7bd82ecb3f3ead79b
Gerrit-Change-Number: 21634
Gerrit-PatchSet: 2
Gerrit-Owner: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Thu, 08 Aug 2024 11:11:58 +0000
Gerrit-HasComments: No

[kudu-CR] Table copy supports creating a table with no range partition

Posted by "Yingchun Lai (Code Review)" <ge...@cloudera.org>.
Yingchun Lai has posted comments on this change. ( http://gerrit.cloudera.org:8080/21634 )

Change subject: Table copy supports creating a table with no range partition
......................................................................


Patch Set 4: Code-Review+2


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I94f99f845393ff2460761cc7bd82ecb3f3ead79b
Gerrit-Change-Number: 21634
Gerrit-PatchSet: 4
Gerrit-Owner: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Thu, 22 Aug 2024 03:43:59 +0000
Gerrit-HasComments: No

[kudu-CR] Table copy supports creating a table with no range partition

Posted by "Yingchun Lai (Code Review)" <ge...@cloudera.org>.
Yingchun Lai has posted comments on this change. ( http://gerrit.cloudera.org:8080/21634 )

Change subject: Table copy supports creating a table with no range partition
......................................................................


Patch Set 2: Code-Review+1


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I94f99f845393ff2460761cc7bd82ecb3f3ead79b
Gerrit-Change-Number: 21634
Gerrit-PatchSet: 2
Gerrit-Owner: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Fri, 09 Aug 2024 09:17:46 +0000
Gerrit-HasComments: No

[kudu-CR] Table copy supports creating a table with no range partition

Posted by "Wang Xixu (Code Review)" <ge...@cloudera.org>.
Hello Mahesh Reddy, Zoltan Chovan, Yingchun Lai, Kudu Jenkins, 

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

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

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

Change subject: Table copy supports creating a table with no range partition
......................................................................

Table copy supports creating a table with no range partition

Currently, using CLI 'table copy' to create a destination table
when the source table doesn't have any range partition, it creates
a table with an unbounded range partition. That makes the source
table's schema different from the destination table's. That
also causes the tablet schema to be different in the same partition.
The following is an example:
The source table schema:
TABLE test1 (
    key INT32 NOT NULL,
    int_val INT32 NOT NULL,
    string_val STRING NULLABLE,
    PRIMARY KEY (key)
)
OWNER root
REPLICAS 1
COMMENT

CLI command:
'kudu table copy $ma test1 $ma --create_table=true'

The destination table schema:
TABLE test1 (
    key INT32 NOT NULL,
    int_val INT32 NOT NULL,
    string_val STRING NULLABLE,
    PRIMARY KEY (key)
)
RANGE (key) (
    PARTITION UNBOUNDED
)
OWNER root
REPLICAS 1
COMMENT

Semantically it is right, but is better to keep the source table
schema the same with the destination schema.

Change-Id: I94f99f845393ff2460761cc7bd82ecb3f3ead79b
---
M src/kudu/tools/kudu-tool-test.cc
M src/kudu/tools/table_scanner.cc
2 files changed, 98 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/34/21634/4
-- 
To view, visit http://gerrit.cloudera.org:8080/21634
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I94f99f845393ff2460761cc7bd82ecb3f3ead79b
Gerrit-Change-Number: 21634
Gerrit-PatchSet: 4
Gerrit-Owner: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>

[kudu-CR] Table copy supports creating a table with no range partition

Posted by "Wang Xixu (Code Review)" <ge...@cloudera.org>.
Hello Zoltan Chovan, Yingchun Lai, Kudu Jenkins, 

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

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

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

Change subject: Table copy supports creating a table with no range partition
......................................................................

Table copy supports creating a table with no range partition

Currently, using CLI 'table copy' to create a destination table
when the source table doesn't have any range partition, it creates
a table with an unbouned range partition. That makes the source
table's schema different from the destination table's. That
also causes the tablet schema to be different in the same partition.
The following is an example:
The source table schema:
TABLE test1 (
    key INT32 NOT NULL,
    int_val INT32 NOT NULL,
    string_val STRING NULLABLE,
    PRIMARY KEY (key)
)
OWNER root
REPLICAS 1
COMMENT

CLI command:
'kudu table copy $ma test1 $ma --create_table=true'

The destination table schema:
TABLE test1 (
    key INT32 NOT NULL,
    int_val INT32 NOT NULL,
    string_val STRING NULLABLE,
    PRIMARY KEY (key)
)
RANGE (key) (
    PARTITION UNBOUNDED
)
OWNER root
REPLICAS 1
COMMENT

Semantically, it is right. But is better to keep the source table
schema the same with the destination schema.

Change-Id: I94f99f845393ff2460761cc7bd82ecb3f3ead79b
---
M src/kudu/tools/kudu-tool-test.cc
M src/kudu/tools/table_scanner.cc
2 files changed, 94 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/34/21634/2
-- 
To view, visit http://gerrit.cloudera.org:8080/21634
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I94f99f845393ff2460761cc7bd82ecb3f3ead79b
Gerrit-Change-Number: 21634
Gerrit-PatchSet: 2
Gerrit-Owner: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>

[kudu-CR] [Tool] CLI table copy creats a table with no range partition

Posted by "Yingchun Lai (Code Review)" <ge...@cloudera.org>.
Yingchun Lai has posted comments on this change. ( http://gerrit.cloudera.org:8080/21634 )

Change subject: [Tool] CLI table copy creats a table with no range partition
......................................................................


Patch Set 1:

(5 comments)

http://gerrit.cloudera.org:8080/#/c/21634/1//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/21634/1//COMMIT_MSG@44
PS1, Line 44: In our company
It's a general requirement to keep the schema consistent, it's not necessary to mention it.


http://gerrit.cloudera.org:8080/#/c/21634/1/src/kudu/tools/kudu-tool-test.cc
File src/kudu/tools/kudu-tool-test.cc:

http://gerrit.cloudera.org:8080/#/c/21634/1/src/kudu/tools/kudu-tool-test.cc@1785
PS1, Line 1785: enum
nit: modernize to use "enum class".


http://gerrit.cloudera.org:8080/#/c/21634/1/src/kudu/tools/kudu-tool-test.cc@1786
PS1, Line 1786: NoRangeHasHashPartition,
              :   NoHashHasRangePartition,
What about "OnlyHashPartition" and "OnlyRangePartition"?

And it would be better to add a `k` leading letter. https://google.github.io/styleguide/cppguide.html#Enumerator_Names


http://gerrit.cloudera.org:8080/#/c/21634/1/src/kudu/tools/kudu-tool-test.cc@1796
PS1, Line 1796: static vector<PartitionCombinationMode> CreatePartitionMode() {
It is necessary to define a function for the test? You can try to pass the enum values to ::testing::Values() directly instead.


http://gerrit.cloudera.org:8080/#/c/21634/1/src/kudu/tools/kudu-tool-test.cc@1867
PS1, Line 1867: // Describe the destination table and check the partition schema.
              :   NO_FATALS(RunActionStdoutString(
              :       Substitute("table describe $0 $1",
              :                  cluster_->master()->bound_rpc_addr().ToString(),
              :                  kDstTableName), &stdout));
              :   switch (create_table_mode) {
              :     case PartitionCombinationMode::NoRangeHasHashPartition:
              :       ASSERT_STR_CONTAINS(stdout, "HASH (key) PARTITIONS");
              :       ASSERT_STR_NOT_CONTAINS(stdout, "RANGE (key)");
              :       break;
              :     case PartitionCombinationMode::NoHashHasRangePartition:
              :       ASSERT_STR_CONTAINS(stdout, "RANGE (key)");
              :       ASSERT_STR_NOT_CONTAINS(stdout, "HASH");
              :       break;
              :     case PartitionCombinationMode::NoHashNoRangePartition:
              :       ASSERT_STR_NOT_CONTAINS(stdout, "HASH");
              :       ASSERT_STR_NOT_CONTAINS(stdout, "RANG");
              :       break;
              :   }
This patch is aim to create a table with a completely a same schema with the source table, it's better to check the string described schemas are the same, right?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I94f99f845393ff2460761cc7bd82ecb3f3ead79b
Gerrit-Change-Number: 21634
Gerrit-PatchSet: 1
Gerrit-Owner: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>
Gerrit-Comment-Date: Wed, 07 Aug 2024 07:24:37 +0000
Gerrit-HasComments: Yes

[kudu-CR] [Tool] CLI table copy creats a table with no range partition

Posted by "Zoltan Chovan (Code Review)" <ge...@cloudera.org>.
Zoltan Chovan has posted comments on this change. ( http://gerrit.cloudera.org:8080/21634 )

Change subject: [Tool] CLI table copy creats a table with no range partition
......................................................................


Patch Set 1:

(6 comments)

http://gerrit.cloudera.org:8080/#/c/21634/1//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/21634/1//COMMIT_MSG@7
PS1, Line 7: creats
creates


http://gerrit.cloudera.org:8080/#/c/21634/1//COMMIT_MSG@10
PS1, Line 10:  without any range partition
doesn't have any range partitions


http://gerrit.cloudera.org:8080/#/c/21634/1//COMMIT_MSG@11
PS1, Line 11: That make the source
            : table schema is different with the destination table's
This makes the source table's schema different from the destination table's.


http://gerrit.cloudera.org:8080/#/c/21634/1//COMMIT_MSG@13
PS1, Line 13: schema different
schema to be different


http://gerrit.cloudera.org:8080/#/c/21634/1//COMMIT_MSG@43
PS1, Line 43: In semantics
semantically it is right


http://gerrit.cloudera.org:8080/#/c/21634/1//COMMIT_MSG@44
PS1, Line 44: In our company
> It's a general requirement to keep the schema consistent, it's not necessar
+1



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I94f99f845393ff2460761cc7bd82ecb3f3ead79b
Gerrit-Change-Number: 21634
Gerrit-PatchSet: 1
Gerrit-Owner: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Wed, 07 Aug 2024 13:00:35 +0000
Gerrit-HasComments: Yes

[kudu-CR] Table copy supports creating a table with no range partition

Posted by "Yingchun Lai (Code Review)" <ge...@cloudera.org>.
Yingchun Lai has posted comments on this change. ( http://gerrit.cloudera.org:8080/21634 )

Change subject: Table copy supports creating a table with no range partition
......................................................................


Patch Set 3: Code-Review+1

(2 comments)

http://gerrit.cloudera.org:8080/#/c/21634/3/src/kudu/tools/kudu-tool-test.cc
File src/kudu/tools/kudu-tool-test.cc:

http://gerrit.cloudera.org:8080/#/c/21634/3/src/kudu/tools/kudu-tool-test.cc@1833
PS3, Line 1833:       break;
nit: Add a check to clarify the logic. Other places are the same.

 default:
         ASSERT_TRUE(false);


http://gerrit.cloudera.org:8080/#/c/21634/3/src/kudu/tools/kudu-tool-test.cc@1867
PS3, Line 1867:  
nit: alignment.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I94f99f845393ff2460761cc7bd82ecb3f3ead79b
Gerrit-Change-Number: 21634
Gerrit-PatchSet: 3
Gerrit-Owner: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Wed, 21 Aug 2024 16:05:50 +0000
Gerrit-HasComments: Yes

[kudu-CR] Table copy supports creating a table with no range partition

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/21634 )

Change subject: Table copy supports creating a table with no range partition
......................................................................


Patch Set 2:

Build Started http://jenkins.kudu.apache.org/job/pre_commit/398/


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I94f99f845393ff2460761cc7bd82ecb3f3ead79b
Gerrit-Change-Number: 21634
Gerrit-PatchSet: 2
Gerrit-Owner: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Thu, 08 Aug 2024 09:10:28 +0000
Gerrit-HasComments: No

[kudu-CR] Table copy supports creating a table with no range partition

Posted by "Zoltan Chovan (Code Review)" <ge...@cloudera.org>.
Zoltan Chovan has posted comments on this change. ( http://gerrit.cloudera.org:8080/21634 )

Change subject: Table copy supports creating a table with no range partition
......................................................................


Patch Set 2: Code-Review+1

(1 comment)

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

http://gerrit.cloudera.org:8080/#/c/21634/2//COMMIT_MSG@43
PS2, Line 43: Semantically, it is right. But is
Semantically it's right, but it is better to keep the source table schema the same with the destination schema.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I94f99f845393ff2460761cc7bd82ecb3f3ead79b
Gerrit-Change-Number: 21634
Gerrit-PatchSet: 2
Gerrit-Owner: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Mon, 12 Aug 2024 07:43:42 +0000
Gerrit-HasComments: Yes

[kudu-CR] Table copy supports creating a table with no range partition

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/21634 )

Change subject: Table copy supports creating a table with no range partition
......................................................................


Patch Set 4: -Verified

Build Started http://jenkins.kudu.apache.org/job/pre_commit/473/


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I94f99f845393ff2460761cc7bd82ecb3f3ead79b
Gerrit-Change-Number: 21634
Gerrit-PatchSet: 4
Gerrit-Owner: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Fri, 06 Sep 2024 18:27:31 +0000
Gerrit-HasComments: No

[kudu-CR] Table copy supports creating a table with no range partition

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/21634 )

Change subject: Table copy supports creating a table with no range partition
......................................................................


Patch Set 4:

Build Started http://jenkins.kudu.apache.org/job/pre_commit/445/


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I94f99f845393ff2460761cc7bd82ecb3f3ead79b
Gerrit-Change-Number: 21634
Gerrit-PatchSet: 4
Gerrit-Owner: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Thu, 22 Aug 2024 03:27:28 +0000
Gerrit-HasComments: No

[kudu-CR] Table copy supports creating a table with no range partition

Posted by "Wang Xixu (Code Review)" <ge...@cloudera.org>.
Wang Xixu has posted comments on this change. ( http://gerrit.cloudera.org:8080/21634 )

Change subject: Table copy supports creating a table with no range partition
......................................................................


Patch Set 2:

(10 comments)

http://gerrit.cloudera.org:8080/#/c/21634/1//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/21634/1//COMMIT_MSG@7
PS1, Line 7: eating
> creates
Done


http://gerrit.cloudera.org:8080/#/c/21634/1//COMMIT_MSG@10
PS1, Line 10:  doesn't have any range part
> doesn't have any range partitions
Done


http://gerrit.cloudera.org:8080/#/c/21634/1//COMMIT_MSG@11
PS1, Line 11: That makes the source
            : table's schema different from the destination table's.
> This makes the source table's schema different from the destination table's
Done


http://gerrit.cloudera.org:8080/#/c/21634/1//COMMIT_MSG@13
PS1, Line 13: schema to be dif
> schema to be different
Done


http://gerrit.cloudera.org:8080/#/c/21634/1//COMMIT_MSG@43
PS1, Line 43: Semantically
> semantically it is right
Done


http://gerrit.cloudera.org:8080/#/c/21634/1//COMMIT_MSG@44
PS1, Line 44: 
> +1
Done


http://gerrit.cloudera.org:8080/#/c/21634/1/src/kudu/tools/kudu-tool-test.cc
File src/kudu/tools/kudu-tool-test.cc:

http://gerrit.cloudera.org:8080/#/c/21634/1/src/kudu/tools/kudu-tool-test.cc@1785
PS1, Line 1785: enum
> nit: modernize to use "enum class".
Done


http://gerrit.cloudera.org:8080/#/c/21634/1/src/kudu/tools/kudu-tool-test.cc@1786
PS1, Line 1786: kOnlyHashPartition,
              :   kOnlyRangePartition,
> What about "OnlyHashPartition" and "OnlyRangePartition"?
Done


http://gerrit.cloudera.org:8080/#/c/21634/1/src/kudu/tools/kudu-tool-test.cc@1796
PS1, Line 1796: INSTANTIATE_TEST_SUITE_P(, CreateNoRangePartitionTable,
> It is necessary to define a function for the test? You can try to pass the 
Done


http://gerrit.cloudera.org:8080/#/c/21634/1/src/kudu/tools/kudu-tool-test.cc@1867
PS1, Line 1867:                                            master_addr,
              :                                              kDstTableName), &stdout_after));
              :   ASSERT_EQ(stdout_before.size(), stdout_after.size());
              :   // Except that they have different table name, they schemas are the same.
              :   // Therefore compare the content from the second line.
              :   for (int i = 1; i < stdout_after.size(); i++) {
              :     ASSERT_EQ(stdout_before[i], stdout_after[i]);
              :   }
              : }
              : 
              : TEST_F(ToolTest, TestFsCheck) {
              :   const string kTestDir = GetTestPath("test");
              :   const string kTabletId = "ffffffffffffffffffffffffffffffff";
              :   const Schema kSchema(GetSimpleTestSchema());
              :   const Schema kSchemaWithIds(SchemaBuilder(kSchema).Build());
              : 
              :   // Create a local replica, flush some rows a few times, and collect all
              :   // of the created block IDs.
              :   B
> This patch is aim to create a table with a completely a same schema with th
Done



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I94f99f845393ff2460761cc7bd82ecb3f3ead79b
Gerrit-Change-Number: 21634
Gerrit-PatchSet: 2
Gerrit-Owner: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Thu, 08 Aug 2024 09:20:35 +0000
Gerrit-HasComments: Yes

[kudu-CR] Table copy supports creating a table with no range partition

Posted by "Wang Xixu (Code Review)" <ge...@cloudera.org>.
Wang Xixu has posted comments on this change. ( http://gerrit.cloudera.org:8080/21634 )

Change subject: Table copy supports creating a table with no range partition
......................................................................


Patch Set 4:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/21634/3/src/kudu/tools/kudu-tool-test.cc
File src/kudu/tools/kudu-tool-test.cc:

http://gerrit.cloudera.org:8080/#/c/21634/3/src/kudu/tools/kudu-tool-test.cc@1833
PS3, Line 1833:       break;
> nit: Add a check to clarify the logic. Other places are the same.
Done


http://gerrit.cloudera.org:8080/#/c/21634/3/src/kudu/tools/kudu-tool-test.cc@1867
PS3, Line 1867: 
> nit: alignment.
Done



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I94f99f845393ff2460761cc7bd82ecb3f3ead79b
Gerrit-Change-Number: 21634
Gerrit-PatchSet: 4
Gerrit-Owner: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Thu, 22 Aug 2024 03:27:42 +0000
Gerrit-HasComments: Yes

[kudu-CR] Table copy supports creating a table with no range partition

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/21634 )

Change subject: Table copy supports creating a table with no range partition
......................................................................


Patch Set 4: Verified-1

Build Failed 

http://jenkins.kudu.apache.org/job/pre_commit/445/ : FAILURE


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I94f99f845393ff2460761cc7bd82ecb3f3ead79b
Gerrit-Change-Number: 21634
Gerrit-PatchSet: 4
Gerrit-Owner: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Thu, 22 Aug 2024 05:29:01 +0000
Gerrit-HasComments: No

[kudu-CR] Table copy supports creating a table with no range partition

Posted by "Wang Xixu (Code Review)" <ge...@cloudera.org>.
Hello Mahesh Reddy, Zoltan Chovan, Yingchun Lai, Kudu Jenkins, 

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

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

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

Change subject: Table copy supports creating a table with no range partition
......................................................................

Table copy supports creating a table with no range partition

Currently, using CLI 'table copy' to create a destination table
when the source table doesn't have any range partition, it creates
a table with an unbounded range partition. That makes the source
table's schema different from the destination table's. That
also causes the tablet schema to be different in the same partition.
The following is an example:
The source table schema:
TABLE test1 (
    key INT32 NOT NULL,
    int_val INT32 NOT NULL,
    string_val STRING NULLABLE,
    PRIMARY KEY (key)
)
OWNER root
REPLICAS 1
COMMENT

CLI command:
'kudu table copy $ma test1 $ma --create_table=true'

The destination table schema:
TABLE test1 (
    key INT32 NOT NULL,
    int_val INT32 NOT NULL,
    string_val STRING NULLABLE,
    PRIMARY KEY (key)
)
RANGE (key) (
    PARTITION UNBOUNDED
)
OWNER root
REPLICAS 1
COMMENT

Semantically it is right, but is better to keep the source table
schema the same with the destination schema.

Change-Id: I94f99f845393ff2460761cc7bd82ecb3f3ead79b
---
M src/kudu/tools/kudu-tool-test.cc
M src/kudu/tools/table_scanner.cc
2 files changed, 94 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/34/21634/3
-- 
To view, visit http://gerrit.cloudera.org:8080/21634
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I94f99f845393ff2460761cc7bd82ecb3f3ead79b
Gerrit-Change-Number: 21634
Gerrit-PatchSet: 3
Gerrit-Owner: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>

[kudu-CR] Table copy supports creating a table with no range partition

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/21634 )

Change subject: Table copy supports creating a table with no range partition
......................................................................


Patch Set 3: Verified-1

Build Failed 

http://jenkins.kudu.apache.org/job/pre_commit/442/ : FAILURE


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I94f99f845393ff2460761cc7bd82ecb3f3ead79b
Gerrit-Change-Number: 21634
Gerrit-PatchSet: 3
Gerrit-Owner: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Wed, 21 Aug 2024 09:16:24 +0000
Gerrit-HasComments: No

[kudu-CR] [Tool] CLI table copy creats a table with no range partition

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/21634 )

Change subject: [Tool] CLI table copy creats a table with no range partition
......................................................................


Patch Set 1:

Build Started http://jenkins.kudu.apache.org/job/pre_commit/372/


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I94f99f845393ff2460761cc7bd82ecb3f3ead79b
Gerrit-Change-Number: 21634
Gerrit-PatchSet: 1
Gerrit-Owner: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Fri, 02 Aug 2024 08:21:41 +0000
Gerrit-HasComments: No

[kudu-CR] [Tool] CLI table copy creats a table with no range partition

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/21634 )

Change subject: [Tool] CLI table copy creats a table with no range partition
......................................................................


Patch Set 1: Verified-1

Build Failed 

http://jenkins.kudu.apache.org/job/pre_commit/372/ : FAILURE


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I94f99f845393ff2460761cc7bd82ecb3f3ead79b
Gerrit-Change-Number: 21634
Gerrit-PatchSet: 1
Gerrit-Owner: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Fri, 02 Aug 2024 09:25:54 +0000
Gerrit-HasComments: No

[kudu-CR] Table copy supports creating a table with no range partition

Posted by "Marton Greber (Code Review)" <ge...@cloudera.org>.
Marton Greber has posted comments on this change. ( http://gerrit.cloudera.org:8080/21634 )

Change subject: Table copy supports creating a table with no range partition
......................................................................


Patch Set 4: Verified+1

Unrelated test failure in debug mode, some Python tests failed due to /tmp/kudutest-1000/minicluster-data being full. Created a ticket to investigate it: KUDU-3615


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I94f99f845393ff2460761cc7bd82ecb3f3ead79b
Gerrit-Change-Number: 21634
Gerrit-PatchSet: 4
Gerrit-Owner: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Mon, 09 Sep 2024 10:39:15 +0000
Gerrit-HasComments: No

[kudu-CR] Table copy supports creating a table with no range partition

Posted by "Marton Greber (Code Review)" <ge...@cloudera.org>.
Marton Greber has removed a vote on this change.

Change subject: Table copy supports creating a table with no range partition
......................................................................


Removed Verified-1 by Kudu Jenkins (120)
-- 
To view, visit http://gerrit.cloudera.org:8080/21634
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: deleteVote
Gerrit-Change-Id: I94f99f845393ff2460761cc7bd82ecb3f3ead79b
Gerrit-Change-Number: 21634
Gerrit-PatchSet: 4
Gerrit-Owner: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>

[kudu-CR] Table copy supports creating a table with no range partition

Posted by "Marton Greber (Code Review)" <ge...@cloudera.org>.
Marton Greber has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/21634 )

Change subject: Table copy supports creating a table with no range partition
......................................................................

Table copy supports creating a table with no range partition

Currently, using CLI 'table copy' to create a destination table
when the source table doesn't have any range partition, it creates
a table with an unbounded range partition. That makes the source
table's schema different from the destination table's. That
also causes the tablet schema to be different in the same partition.
The following is an example:
The source table schema:
TABLE test1 (
    key INT32 NOT NULL,
    int_val INT32 NOT NULL,
    string_val STRING NULLABLE,
    PRIMARY KEY (key)
)
OWNER root
REPLICAS 1
COMMENT

CLI command:
'kudu table copy $ma test1 $ma --create_table=true'

The destination table schema:
TABLE test1 (
    key INT32 NOT NULL,
    int_val INT32 NOT NULL,
    string_val STRING NULLABLE,
    PRIMARY KEY (key)
)
RANGE (key) (
    PARTITION UNBOUNDED
)
OWNER root
REPLICAS 1
COMMENT

Semantically it is right, but is better to keep the source table
schema the same with the destination schema.

Change-Id: I94f99f845393ff2460761cc7bd82ecb3f3ead79b
Reviewed-on: http://gerrit.cloudera.org:8080/21634
Reviewed-by: Yingchun Lai <la...@apache.org>
Tested-by: Marton Greber <gr...@gmail.com>
Reviewed-by: Marton Greber <gr...@gmail.com>
---
M src/kudu/tools/kudu-tool-test.cc
M src/kudu/tools/table_scanner.cc
2 files changed, 98 insertions(+), 2 deletions(-)

Approvals:
  Yingchun Lai: Looks good to me, approved
  Marton Greber: Looks good to me, but someone else must approve; Verified

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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I94f99f845393ff2460761cc7bd82ecb3f3ead79b
Gerrit-Change-Number: 21634
Gerrit-PatchSet: 5
Gerrit-Owner: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>