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 <[email protected]>

Reply via email to