Attila Bukor has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/13760 )

Change subject: KUDU-1938 Add support for CHAR/VARCHAR pt 1
......................................................................


Patch Set 13:

(8 comments)

http://gerrit.cloudera.org:8080/#/c/13760/10/src/kudu/client/scan_batch.h
File src/kudu/client/scan_batch.h:

http://gerrit.cloudera.org:8080/#/c/13760/10/src/kudu/client/scan_batch.h@266
PS10, Line 266:   Status GetChar(const Slice& col_name, Slice* val) const 
WARN_UNUSED_RESULT;
> Similar to GetBinary and GetString, I think these should be different metho
Done


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

http://gerrit.cloudera.org:8080/#/c/13760/10/src/kudu/client/schema.cc@348
PS10, Line 348:   } else if (data_->type.value() == KuduColumnSchema::CHAR) {
> I think the standard max CHAR length is 254.
Done


http://gerrit.cloudera.org:8080/#/c/13760/10/src/kudu/client/schema.cc@377
PS10, Line 377:           strings::Substitute("length is not valid on a $0 
column",
> This should likely default to 0 given it's "unused" in this case. That matc
Done


http://gerrit.cloudera.org:8080/#/c/13760/10/src/kudu/common/column_predicate-test.cc
File src/kudu/common/column_predicate-test.cc:

http://gerrit.cloudera.org:8080/#/c/13760/10/src/kudu/common/column_predicate-test.cc@1124
PS10, Line 1124:     ColumnSchema chars("char", CHAR);
> nit: "char"
I changed the name, 'char' is a reserved keyword, so I can't rename the variable


http://gerrit.cloudera.org:8080/#/c/13760/10/src/kudu/common/partial_row.h
File src/kudu/common/partial_row.h:

http://gerrit.cloudera.org:8080/#/c/13760/10/src/kudu/common/partial_row.h@167
PS10, Line 167:   Status SetChar(const Slice& col_name, const Slice& val) 
WARN_UNUSED_RESULT;
> Similar to SetBinary and SetString, I think these should be different metho
Done


http://gerrit.cloudera.org:8080/#/c/13760/10/src/kudu/common/types.h
File src/kudu/common/types.h:

http://gerrit.cloudera.org:8080/#/c/13760/10/src/kudu/common/types.h@634
PS10, Line 634: struct DataTypeTraits<CHAR> : public DerivedTypeTraits<BINARY>{
> Can this be DerivedTypeTraits STRING to unify all the UTF8 and debug string
DerivedTypeTraits is template<DataType PhysicalType>, so I think only physical 
types can be used here. When I tried changing it to STRING it compiled, but the 
all_types-itest failed for each char type with this:

"Bad status: Not implemented: Error creating table all-types-table on the 
master: invalid encoding for column 'char_val': encoding AUTO_ENCODING not 
supported for type STRING"

Maybe I'm just missing something (do you have any pointers in this case?), but 
I think extending DerivedTypeTraits<STRING> won't work.


http://gerrit.cloudera.org:8080/#/c/13760/10/src/kudu/util/char_util.h
File src/kudu/util/char_util.h:

http://gerrit.cloudera.org:8080/#/c/13760/10/src/kudu/util/char_util.h@28
PS10, Line 28: 
> I think the standard for max CHAR length is 255 and max VARCHAR is 65535.
Done


http://gerrit.cloudera.org:8080/#/c/13760/10/src/kudu/util/char_util.h@29
PS10, Line 29:   // Minimum and maximum length for CHAR [1,255]
> Do we need to have a default? Shouldn't we require it to be specified fo CH
Done



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I998982dba93831db91c43a97ce30d3e68c2a4a54
Gerrit-Change-Number: 13760
Gerrit-PatchSet: 13
Gerrit-Owner: Attila Bukor <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Attila Bukor <[email protected]>
Gerrit-Reviewer: Grant Henke <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Todd Lipcon <[email protected]>
Gerrit-Reviewer: Will Berkeley <[email protected]>
Gerrit-Comment-Date: Sat, 29 Jun 2019 18:58:01 +0000
Gerrit-HasComments: Yes

Reply via email to