Yifan Zhang has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/13976 )

Change subject: [tools] Add table tools to delete column and alter column
......................................................................


Patch Set 5:

(5 comments)

http://gerrit.cloudera.org:8080/#/c/13976/4/src/kudu/client/schema.cc
File src/kudu/client/schema.cc:

http://gerrit.cloudera.org:8080/#/c/13976/4/src/kudu/client/schema.cc@720
PS4, Line 720:
             : bool KuduSchema::Column(const std::string& col_name, 
KuduColumnSchema* col_schema) const {
             :   int idx = schema_->find_column(col_name);
             :   if (idx == Schema::kColumnNotFound) {
             :     return false;
             :
> Hitting a CHECK or DCHECK as a user is pretty unpleasant. It's a better use
Done


http://gerrit.cloudera.org:8080/#/c/13976/4/src/kudu/tools/tool_action_table.cc
File src/kudu/tools/tool_action_table.cc:

http://gerrit.cloudera.org:8080/#/c/13976/4/src/kudu/tools/tool_action_table.cc@183
PS4, Line 183: enum PartitionAction {
             :   ADD,
> nit: not from this patch, but could you reduce the indent here by two space
Done


http://gerrit.cloudera.org:8080/#/c/13976/4/src/kudu/tools/tool_action_table.cc@710
PS4, Line 710:         *value = KuduValue::CopyString(str_value);
> Why aren't other types (e.g. bool, binary, decimal) represented here?
I agreed that using Status as return value is more friendly to users, and I 
removed all CHECKs and DCHECKs in this patch.

I added bool, binary and unixtime_micros types, the decimal type column is not 
supported now for it's quiet difficult to parse input value.


http://gerrit.cloudera.org:8080/#/c/13976/4/src/kudu/tools/tool_action_table.cc@732
PS4, Line 732:         *value = KuduValue::FromDouble(strtod(str_value.c_str(), 
nullptr));
             :       }
             :       break;
             :     default:
             :       return Status::NotSupported(Substitute(
             :         "Unsupported column type $0 for setting default value.", 
type));
             :   }
             :   return Status::OK();
             : }
             :
             : Status ParseSetEncodingArgs(const std::string& args,
             :                             
KuduColumnStorageAttributes::EncodingType* encod
> What do you think about storing these in a map of { string =>  KuduColumnSt
Done


http://gerrit.cloudera.org:8080/#/c/13976/4/src/kudu/tools/tool_action_table.cc@810
PS4, Line 810:
> Should we check that the input here is valid?
Done



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I228340e46fe48ffc782c4c7346f890444b8c550f
Gerrit-Change-Number: 13976
Gerrit-PatchSet: 5
Gerrit-Owner: Yifan Zhang <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yifan Zhang <[email protected]>
Gerrit-Reviewer: Yingchun Lai <[email protected]>
Gerrit-Comment-Date: Wed, 07 Aug 2019 11:39:46 +0000
Gerrit-HasComments: Yes

Reply via email to