You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Yan-Daojiang (Code Review)" <ge...@cloudera.org> on 2026/05/11 11:19:05 UTC
[kudu-CR] [tools] fix `table add column` failing to add DECIMAL/VARCHAR columns
Yan-Daojiang has uploaded this change for review. ( http://gerrit.cloudera.org:8080/24290
Change subject: [tools] fix `table add_column` failing to add DECIMAL/VARCHAR columns
......................................................................
[tools] fix `table add_column` failing to add DECIMAL/VARCHAR columns
`kudu table add_column` does not correctly support DECIMAL
or VARCHAR columns.
The CLI never forwards precision/scale/length attributes to
KuduColumnSpec, even though the `table create` JSON path
already handles type_attributes correctly in
ParseTableSchema().
The following invocations currently fail:
kudu table add_column <m> <t> c DECIMAL
kudu table add_column <m> <t> c "DECIMAL(10,2)"
kudu table add_column <m> <t> c VARCHAR
Propagate precision/scale/length through the AddColumn()
code path via three new optional flags:
--column_precision, --column_scale, and --column_length.
Missing required attributes are now rejected client-side
with a clear error message pointing to the required flag,
instead of the previous server-side "no precision provided"
error.
Drive-by: remove "TIMESTAMP" from the kDataTypeArg help
text. Kudu uses UNIXTIME_MICROS instead, and
StringToDataType() does not recognize TIMESTAMP.
Adds regression tests covering both DECIMAL and VARCHAR
success paths, along with missing-attribute validation.
Change-Id: I4cf3cc23d1bc972c48bbc4a579503b13aad47655
---
M src/kudu/tools/kudu-tool-test.cc
M src/kudu/tools/tool_action_table.cc
2 files changed, 141 insertions(+), 3 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/90/24290/1
--
To view, visit http://gerrit.cloudera.org:8080/24290
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4cf3cc23d1bc972c48bbc4a579503b13aad47655
Gerrit-Change-Number: 24290
Gerrit-PatchSet: 1
Gerrit-Owner: Yan-Daojiang <ya...@163.com>
[kudu-CR] [tools] fix `table add column` failing to add DECIMAL/VARCHAR columns
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24290 )
Change subject: [tools] fix `table add_column` failing to add DECIMAL/VARCHAR columns
......................................................................
Patch Set 2: Verified-1
Build Failed
http://jenkins.kudu.apache.org/job/pre_commit/2560/ : FAILURE
--
To view, visit http://gerrit.cloudera.org:8080/24290
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4cf3cc23d1bc972c48bbc4a579503b13aad47655
Gerrit-Change-Number: 24290
Gerrit-PatchSet: 2
Gerrit-Owner: Yan-Daojiang <ya...@163.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Yan-Daojiang <ya...@163.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Comment-Date: Tue, 12 May 2026 01:41:50 +0000
Gerrit-HasComments: No
[kudu-CR] [tools] fix `table add column` failing to add DECIMAL/VARCHAR columns
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24290 )
Change subject: [tools] fix `table add_column` failing to add DECIMAL/VARCHAR columns
......................................................................
Patch Set 1: Verified-1
Build Failed
http://jenkins.kudu.apache.org/job/pre_commit/2557/ : FAILURE
--
To view, visit http://gerrit.cloudera.org:8080/24290
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4cf3cc23d1bc972c48bbc4a579503b13aad47655
Gerrit-Change-Number: 24290
Gerrit-PatchSet: 1
Gerrit-Owner: Yan-Daojiang <ya...@163.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Mon, 11 May 2026 12:06:16 +0000
Gerrit-HasComments: No
[kudu-CR] [tools] fix `table add column` failing to add DECIMAL/VARCHAR columns
Posted by "Yan-Daojiang (Code Review)" <ge...@cloudera.org>.
Hello Marton Greber, Alexey Serbin, Zoltan Martonka, Gabriella Lotz, Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/24290
to look at the new patch set (#2).
Change subject: [tools] fix `table add_column` failing to add DECIMAL/VARCHAR columns
......................................................................
[tools] fix `table add_column` failing to add DECIMAL/VARCHAR columns
`kudu table add_column` does not correctly support DECIMAL
or VARCHAR columns.
The CLI never forwards precision/scale/length attributes to
KuduColumnSpec, even though the `table create` JSON path
already handles type_attributes correctly in
ParseTableSchema().
The following invocations currently fail:
kudu table add_column <m> <t> c DECIMAL
kudu table add_column <m> <t> c "DECIMAL(10,2)"
kudu table add_column <m> <t> c VARCHAR
Propagate precision/scale/length through the AddColumn()
code path via three new optional flags:
--column_precision, --column_scale, and --column_length.
Missing required attributes are now rejected client-side
with a clear error message pointing to the required flag,
instead of the previous server-side "no precision provided"
error.
Drive-by: remove "TIMESTAMP" from the kDataTypeArg help
text. Kudu uses UNIXTIME_MICROS instead, and
StringToDataType() does not recognize TIMESTAMP.
Adds regression tests covering both DECIMAL and VARCHAR
success paths, along with missing-attribute validation.
Change-Id: I4cf3cc23d1bc972c48bbc4a579503b13aad47655
---
M src/kudu/tools/kudu-tool-test.cc
M src/kudu/tools/tool_action_table.cc
2 files changed, 142 insertions(+), 3 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/90/24290/2
--
To view, visit http://gerrit.cloudera.org:8080/24290
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I4cf3cc23d1bc972c48bbc4a579503b13aad47655
Gerrit-Change-Number: 24290
Gerrit-PatchSet: 2
Gerrit-Owner: Yan-Daojiang <ya...@163.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Yan-Daojiang <ya...@163.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
[kudu-CR] [tools] fix `table add column` failing to add DECIMAL/VARCHAR columns
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/24290 )
Change subject: [tools] fix `table add_column` failing to add DECIMAL/VARCHAR columns
......................................................................
Patch Set 2: Verified+1
Unrelated failure of known flaky test org.apache.kudu.spark.kudu.DefaultSourceTest in TSAN.
--
To view, visit http://gerrit.cloudera.org:8080/24290
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4cf3cc23d1bc972c48bbc4a579503b13aad47655
Gerrit-Change-Number: 24290
Gerrit-PatchSet: 2
Gerrit-Owner: Yan-Daojiang <ya...@163.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Yan-Daojiang <ya...@163.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Comment-Date: Tue, 12 May 2026 01:46:48 +0000
Gerrit-HasComments: No
[kudu-CR] [tools] fix `table add column` failing to add DECIMAL/VARCHAR columns
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/24290 )
Change subject: [tools] fix `table add_column` failing to add DECIMAL/VARCHAR columns
......................................................................
Patch Set 2: Code-Review+2
Thank you for the fix!
--
To view, visit http://gerrit.cloudera.org:8080/24290
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4cf3cc23d1bc972c48bbc4a579503b13aad47655
Gerrit-Change-Number: 24290
Gerrit-PatchSet: 2
Gerrit-Owner: Yan-Daojiang <ya...@163.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Yan-Daojiang <ya...@163.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Comment-Date: Tue, 12 May 2026 01:47:11 +0000
Gerrit-HasComments: No
[kudu-CR] [tools] fix `table add column` failing to add DECIMAL/VARCHAR columns
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/24290 )
Change subject: [tools] fix `table add_column` failing to add DECIMAL/VARCHAR columns
......................................................................
Patch Set 1: Verified+1
(1 comment)
LGTM, just one tiny nit
http://gerrit.cloudera.org:8080/#/c/24290/1/src/kudu/tools/tool_action_table.cc
File src/kudu/tools/tool_action_table.cc:
http://gerrit.cloudera.org:8080/#/c/24290/1/src/kudu/tools/tool_action_table.cc@2194
PS1, Line 2194:
nit: maybe, add DECIMAL and VARCHAR into the list as well?
--
To view, visit http://gerrit.cloudera.org:8080/24290
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4cf3cc23d1bc972c48bbc4a579503b13aad47655
Gerrit-Change-Number: 24290
Gerrit-PatchSet: 1
Gerrit-Owner: Yan-Daojiang <ya...@163.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Yan-Daojiang <ya...@163.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Comment-Date: Mon, 11 May 2026 20:22:51 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tools] fix `table add column` failing to add DECIMAL/VARCHAR columns
Posted by "Yan-Daojiang (Code Review)" <ge...@cloudera.org>.
Yan-Daojiang has posted comments on this change. ( http://gerrit.cloudera.org:8080/24290 )
Change subject: [tools] fix `table add_column` failing to add DECIMAL/VARCHAR columns
......................................................................
Patch Set 2:
(1 comment)
> Patch Set 1: Verified+1
>
> (1 comment)
>
> LGTM, just one tiny nit
Thanks for the review, done!
http://gerrit.cloudera.org:8080/#/c/24290/1/src/kudu/tools/tool_action_table.cc
File src/kudu/tools/tool_action_table.cc:
http://gerrit.cloudera.org:8080/#/c/24290/1/src/kudu/tools/tool_action_table.cc@2194
PS1, Line 2194:
> nit: maybe, add DECIMAL and VARCHAR into the list as well?
Done
--
To view, visit http://gerrit.cloudera.org:8080/24290
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4cf3cc23d1bc972c48bbc4a579503b13aad47655
Gerrit-Change-Number: 24290
Gerrit-PatchSet: 2
Gerrit-Owner: Yan-Daojiang <ya...@163.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Yan-Daojiang <ya...@163.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Comment-Date: Tue, 12 May 2026 01:09:07 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tools] fix `table add column` failing to add DECIMAL/VARCHAR columns
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24290 )
Change subject: [tools] fix `table add_column` failing to add DECIMAL/VARCHAR columns
......................................................................
Patch Set 1:
Build Started http://jenkins.kudu.apache.org/job/pre_commit/2557/
--
To view, visit http://gerrit.cloudera.org:8080/24290
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4cf3cc23d1bc972c48bbc4a579503b13aad47655
Gerrit-Change-Number: 24290
Gerrit-PatchSet: 1
Gerrit-Owner: Yan-Daojiang <ya...@163.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Mon, 11 May 2026 11:19:13 +0000
Gerrit-HasComments: No
[kudu-CR] [tools] fix `table add column` failing to add DECIMAL/VARCHAR columns
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has removed a vote on this change.
Change subject: [tools] fix `table add_column` failing to add DECIMAL/VARCHAR columns
......................................................................
Removed Verified-1 by Kudu Jenkins (120)
--
To view, visit http://gerrit.cloudera.org:8080/24290
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: deleteVote
Gerrit-Change-Id: I4cf3cc23d1bc972c48bbc4a579503b13aad47655
Gerrit-Change-Number: 24290
Gerrit-PatchSet: 2
Gerrit-Owner: Yan-Daojiang <ya...@163.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Yan-Daojiang <ya...@163.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
[kudu-CR] [tools] fix `table add column` failing to add DECIMAL/VARCHAR columns
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24290 )
Change subject: [tools] fix `table add_column` failing to add DECIMAL/VARCHAR columns
......................................................................
Patch Set 2:
Build Started http://jenkins.kudu.apache.org/job/pre_commit/2560/
--
To view, visit http://gerrit.cloudera.org:8080/24290
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4cf3cc23d1bc972c48bbc4a579503b13aad47655
Gerrit-Change-Number: 24290
Gerrit-PatchSet: 2
Gerrit-Owner: Yan-Daojiang <ya...@163.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Yan-Daojiang <ya...@163.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Comment-Date: Tue, 12 May 2026 00:54:11 +0000
Gerrit-HasComments: No
[kudu-CR] [tools] fix `table add column` failing to add DECIMAL/VARCHAR columns
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/24290 )
Change subject: [tools] fix `table add_column` failing to add DECIMAL/VARCHAR columns
......................................................................
[tools] fix `table add_column` failing to add DECIMAL/VARCHAR columns
`kudu table add_column` does not correctly support DECIMAL
or VARCHAR columns.
The CLI never forwards precision/scale/length attributes to
KuduColumnSpec, even though the `table create` JSON path
already handles type_attributes correctly in
ParseTableSchema().
The following invocations currently fail:
kudu table add_column <m> <t> c DECIMAL
kudu table add_column <m> <t> c "DECIMAL(10,2)"
kudu table add_column <m> <t> c VARCHAR
Propagate precision/scale/length through the AddColumn()
code path via three new optional flags:
--column_precision, --column_scale, and --column_length.
Missing required attributes are now rejected client-side
with a clear error message pointing to the required flag,
instead of the previous server-side "no precision provided"
error.
Drive-by: remove "TIMESTAMP" from the kDataTypeArg help
text. Kudu uses UNIXTIME_MICROS instead, and
StringToDataType() does not recognize TIMESTAMP.
Adds regression tests covering both DECIMAL and VARCHAR
success paths, along with missing-attribute validation.
Change-Id: I4cf3cc23d1bc972c48bbc4a579503b13aad47655
Reviewed-on: http://gerrit.cloudera.org:8080/24290
Tested-by: Alexey Serbin <al...@apache.org>
Reviewed-by: Alexey Serbin <al...@apache.org>
---
M src/kudu/tools/kudu-tool-test.cc
M src/kudu/tools/tool_action_table.cc
2 files changed, 142 insertions(+), 3 deletions(-)
Approvals:
Alexey Serbin: Looks good to me, approved; Verified
--
To view, visit http://gerrit.cloudera.org:8080/24290
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I4cf3cc23d1bc972c48bbc4a579503b13aad47655
Gerrit-Change-Number: 24290
Gerrit-PatchSet: 3
Gerrit-Owner: Yan-Daojiang <ya...@163.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Yan-Daojiang <ya...@163.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>