YangSong has posted comments on this change. (
http://gerrit.cloudera.org:8080/14306 )
Change subject: add a tool to create table
......................................................................
Patch Set 22:
"we'll ensure that both missing values and unknown values return an error per
your ToClientEncodingType and equivalent functions".
I'm sorry, I don't understand this place. I think missing values is a normal
behavior, not an error. If the user does not pass, use the default value. Only
unknown values need to return an error.
Here I can define the enum type as int32, such as
message CreateTablePB {
enum EncodingType {
UNKNOWN_ENCODING = 0;
AUTO_ENCODING = 1;
}
optional int32 type = 1;
}
then call Foo_IsValid(int value) on the enum after parsing it from JSON. But
user can't pass it as character string. If keeping using enum, I think we can't
use 'JsonStringToMessage' or 'ParseFromString' directly. Their enum results are
different in different versions or systems. Maybe I should parse it by myself.
Or do some extra work with enum types. We need to determine if it exists first,
and then you can tell if it's the right value.
--
To view, visit http://gerrit.cloudera.org:8080/14306
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0bce4733a504f8ef5f024089a16fe3c6f1e493f1
Gerrit-Change-Number: 14306
Gerrit-PatchSet: 22
Gerrit-Owner: YangSong <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: YangSong <[email protected]>
Gerrit-Comment-Date: Mon, 21 Oct 2019 02:11:16 +0000
Gerrit-HasComments: No