Alexey Serbin has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/19384 )

Change subject: KUDU-1945: Support non unique primary key for Java client
......................................................................


Patch Set 13:

(2 comments)

> (2 comments)
 >
 > The build failure was due to the dependency on the server side
 > change https://gerrit.cloudera.org/#/c/19097/. The code change is
 > dependent on the additional fields added to src/kudu/common/common.proto
 > by that patch.

Well, you could base your patch on top of that one: first check out the version 
of that change in your workspace and then create a branch on top of that.  To 
check out the branch in question from gerrit, use corresponding link from the 
'Download' dropdown in the upper right corner of the gerrit's UI.

http://gerrit.cloudera.org:8080/#/c/19384/13/java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduClient.java
File java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduClient.java:

http://gerrit.cloudera.org:8080/#/c/19384/13/java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduClient.java@652
PS13, Line 652: AutoIncrementingColumnSchemaBuilder(
              :               Schema.getAutoIncrementingColumnName())
Maybe, add AutoIncrementingColumnSchemaBuilder() constructor that takes no 
parameters and sets the name for the column to be 
Schema.getAutoIncrementingColumnName()?


http://gerrit.cloudera.org:8080/#/c/19384/13/java/kudu-client/src/main/java/org/apache/kudu/client/ProtobufHelper.java
File java/kudu-client/src/main/java/org/apache/kudu/client/ProtobufHelper.java:

http://gerrit.cloudera.org:8080/#/c/19384/13/java/kudu-client/src/main/java/org/apache/kudu/client/ProtobufHelper.java@161
PS13, Line 161:   } else {
              :       Type type = Type.getTypeForDataType(pb.getType());
              :       ColumnTypeAttributes typeAttributes = 
pb.hasTypeAttributes() ?
              :           pbToColumnTypeAttributes(pb.getTypeAttributes()) : 
null;
              :       Object defaultValue = pb.hasWriteDefaultValue() ?
              :           byteStringToObject(type, typeAttributes, 
pb.getWriteDefaultValue()) : null;
              :       ColumnSchema.Encoding encoding = 
ColumnSchema.Encoding.valueOf(pb.getEncoding().name());
              :       ColumnSchema.CompressionAlgorithm compressionAlgorithm =
              :           
ColumnSchema.CompressionAlgorithm.valueOf(pb.getCompression().name());
              :       int desiredBlockSize = pb.getCfileBlockSize();
              :       ColumnSchema.ColumnSchemaBuilder csb =
              :           new ColumnSchema.ColumnSchemaBuilder(pb.getName(), 
type);
              :       if (pb.getIsKey() && !isKeyUnique) {
              :         csb.nonUniqueKey(true);
              :       } else {
              :         csb.key(pb.getIsKey());
              :       }
              :       return csb.nullable(pb.getIsNullable())
              :                 .immutable(pb.getImmutable())
              :                 .defaultValue(defaultValue)
              :                 .encoding(encoding)
              :                 .compressionAlgorithm(compressionAlgorithm)
              :                 .desiredBlockSize(desiredBlockSize)
              :                 .typeAttributes(typeAttributes)
              :                 .comment(pb.getComment())
              :                 .build();
              :     }
nit: for better readability, move this out of the 'else' case since there is 
'return' in the 'if()' clause above.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7e2501d6b3d66f6466959e4f3f1ed0f5e08dfe5c
Gerrit-Change-Number: 19384
Gerrit-PatchSet: 13
Gerrit-Owner: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Reviewer: Abhishek Chennaka <achenn...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <ale...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Kurt Deschler <kdesc...@cloudera.com>
Gerrit-Reviewer: Marton Greber <greber...@gmail.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Thu, 05 Jan 2023 00:41:07 +0000
Gerrit-HasComments: Yes

Reply via email to