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 <[email protected]>
Tested-by: Marton Greber <[email protected]>
Reviewed-by: Marton Greber <[email protected]>
---
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 <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <[email protected]>
Gerrit-Reviewer: Marton Greber <[email protected]>
Gerrit-Reviewer: Wang Xixu <[email protected]>
Gerrit-Reviewer: Yingchun Lai <[email protected]>
Gerrit-Reviewer: Zoltan Chovan <[email protected]>