You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Mahesh Reddy (Code Review)" <ge...@cloudera.org> on 2021/02/05 08:44:50 UTC

[kudu-CR] wip KUDU-2671: Adds new fields to PartitionSchema.

Mahesh Reddy has uploaded this change for review. ( http://gerrit.cloudera.org:8080/17025


Change subject: wip KUDU-2671: Adds new fields to PartitionSchema.
......................................................................

wip KUDU-2671: Adds new fields to PartitionSchema.

This patch introduces two new fields to PartitionSchema, range bounds
and their respective hash bucket schemas. Any instance that assumes
the same hash schemas are used for each range will need these new fields.
Some of the more important instances include partition pruning and many
of the internal PartitionSchema functions.

This patch is WIP because I'm mostly looking for feedback on the approach
of adding the two new fields and its encoder/decoder functions. The new
client_schema parameter in PartitionSchema::FromPB() is necessary for
the RowOperationsPB decoder. For the call sites that don't provide an
explicit client schema, they use schema.CopyWithoutColumnIds(). I haven't
written any tests but would like some feedback about the viability of
using the schema without its columnIds as the client_schema.

I moved RowOperationsPB to a separate .proto file due to some circular
dependency issues between common.proto and wire_protocol.proto. Most of
the proto changes in this patch revolve around this change.

Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
---
M java/kudu-client/src/main/java/org/apache/kudu/client/Operation.java
M src/kudu/client/client-internal.cc
M src/kudu/client/scan_token-internal.cc
M src/kudu/common/CMakeLists.txt
M src/kudu/common/common.proto
M src/kudu/common/partition-test.cc
M src/kudu/common/partition.cc
M src/kudu/common/partition.h
M src/kudu/common/partition_pruner-test.cc
M src/kudu/common/partition_pruner.cc
M src/kudu/common/row_operations-test.cc
M src/kudu/common/row_operations.h
A src/kudu/common/row_operations.proto
M src/kudu/common/scan_spec-test.cc
M src/kudu/common/wire_protocol.proto
M src/kudu/integration-tests/ts_tablet_manager-itest.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/master/master.proto
M src/kudu/master/master_path_handlers.cc
M src/kudu/master/sys_catalog.cc
M src/kudu/tablet/tablet-harness.h
M src/kudu/tablet/tablet_metadata.cc
M src/kudu/tools/tool_action_remote_replica.cc
M src/kudu/tserver/tablet_copy_client.cc
M src/kudu/tserver/tablet_server-test.cc
M src/kudu/tserver/tablet_service.cc
M src/kudu/tserver/tserver.proto
27 files changed, 286 insertions(+), 114 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/25/17025/1
-- 
To view, visit http://gerrit.cloudera.org:8080/17025
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
Gerrit-Change-Number: 17025
Gerrit-PatchSet: 1
Gerrit-Owner: Mahesh Reddy <mr...@cloudera.com>

[kudu-CR] KUDU-2671: Adds new field to PartitionSchema.

Posted by "Mahesh Reddy (Code Review)" <ge...@cloudera.org>.
Mahesh Reddy has posted comments on this change. ( http://gerrit.cloudera.org:8080/17025 )

Change subject: KUDU-2671: Adds new field to PartitionSchema.
......................................................................


Patch Set 11:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/17025/9/src/kudu/common/partition-test.cc
File src/kudu/common/partition-test.cc:

http://gerrit.cloudera.org:8080/#/c/17025/9/src/kudu/common/partition-test.cc@1303
PS9, Line 1303: 
              :   // [(a2, _, c4), (a2, _, c5))
> I meant in addition to the checks on these fields, doing another verificati
Ack


http://gerrit.cloudera.org:8080/#/c/17025/9/src/kudu/common/partition.cc
File src/kudu/common/partition.cc:

http://gerrit.cloudera.org:8080/#/c/17025/9/src/kudu/common/partition.cc@204
PS9, Line 204:     if (ops.size() != 2) {
> Seems like we make that assumption here: https://github.com/apache/kudu/blo
Ack


http://gerrit.cloudera.org:8080/#/c/17025/10/src/kudu/common/partition.cc
File src/kudu/common/partition.cc:

http://gerrit.cloudera.org:8080/#/c/17025/10/src/kudu/common/partition.cc@205
PS10, Line 205: (Substitute("$0 ops were provided; Only two ops are expected 
> nit: maybe also mention how many there are?
Done



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
Gerrit-Change-Number: 17025
Gerrit-PatchSet: 11
Gerrit-Owner: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Wed, 31 Mar 2021 23:25:51 +0000
Gerrit-HasComments: Yes

[kudu-CR] wip KUDU-2671: Adds new fields to PartitionSchema.

Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/17025 )

Change subject: wip KUDU-2671: Adds new fields to PartitionSchema.
......................................................................


Patch Set 1:

(7 comments)

http://gerrit.cloudera.org:8080/#/c/17025/1//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/17025/1//COMMIT_MSG@9
PS1, Line 9: two new fields to PartitionSchema, range bounds
           : and their respective hash bucket schemas
nit: seems like you've since merged these into one field, which I like.


http://gerrit.cloudera.org:8080/#/c/17025/1//COMMIT_MSG@20
PS1, Line 20: viability of
            : using the schema without its columnIds as the client_schema.
I think this should be safe. The main point of distinction between 'client_schema' and 'tablet_schema' is that way back when, we didn't want to expose column IDs as a public interface, and so effort was put in to ensuring clients don't know about them. AFAICT there isn't a correctness concern in using the tablet schema sans IDs as the client schema.


http://gerrit.cloudera.org:8080/#/c/17025/1/src/kudu/common/common.proto
File src/kudu/common/common.proto:

http://gerrit.cloudera.org:8080/#/c/17025/1/src/kudu/common/common.proto@356
PS1, Line 356:   repeated PerRangeHashBucketSchemasPB range_hash_schemas = 3;
             :   repeated RowOperationsPB range_bounds = 4;
nit: should doc what these are and ordering requirements with respect to each other.


http://gerrit.cloudera.org:8080/#/c/17025/1/src/kudu/common/partition.h
File src/kudu/common/partition.h:

http://gerrit.cloudera.org:8080/#/c/17025/1/src/kudu/common/partition.h@176
PS1, Line 176: client_schema
It'd be great if you could add more context into how and in what context this will be used. In the places it matters, will we always have access to a client schema without column IDs? Or will we have to make a copy every time? I don't think this is used on any hot paths (at worst, table/tablet creation), but I wonder if it's worth updating the decoder code to just use 'schema'.

E.g. Could we update DecodeOperations to allow the client schema to have column IDs, and if it does, no-op the ClientServerMapping checks? I can imagine maybe allowing ClientServerMapping's client_schema to be null, and if so, always returning Status::OK(). Have you considered that? It seems like it'd be safe, since the whole purpose of the ClientServerMapping is to ensure the schemas match, which doesn't seem important if we only have one schema.


http://gerrit.cloudera.org:8080/#/c/17025/1/src/kudu/common/partition.h@180
PS1, Line 180: Schema
nit: add docs for new fields


http://gerrit.cloudera.org:8080/#/c/17025/1/src/kudu/common/partition.cc
File src/kudu/common/partition.cc:

http://gerrit.cloudera.org:8080/#/c/17025/1/src/kudu/common/partition.cc@256
PS1, Line 256: pb->mutable_range_hash_schemas()->Reserve(ranges_with_hash_schemas_.size());
nit: should probably wrap all of this in an if (!ranges_with_hash_schemas.empty()), since calling mutable_* allocates a new object.


http://gerrit.cloudera.org:8080/#/c/17025/1/src/kudu/common/partition.cc@262
PS1, Line 262: KuduPartialRow lower(&schema);
             :     KuduPartialRow upper(&schema);
I forget if we've discussed this, but is it possible for either of these to be -Inf or +Inf? Can users specify per-range hash buckets for unbounded ranges?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
Gerrit-Change-Number: 17025
Gerrit-PatchSet: 1
Gerrit-Owner: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Fri, 05 Feb 2021 19:32:09 +0000
Gerrit-HasComments: Yes

[kudu-CR] wip KUDU-2671: Adds new fields to PartitionSchema.

Posted by "Mahesh Reddy (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins, Andrew Wong, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/17025

to look at the new patch set (#3).

Change subject: wip KUDU-2671: Adds new fields to PartitionSchema.
......................................................................

wip KUDU-2671: Adds new fields to PartitionSchema.

This patch introduces two new fields to PartitionSchema, range bounds
and their respective hash bucket schemas. Any instance that assumes
the same hash schemas are used for each range will need these new fields.
Some of the more important instances include partition pruning and many
of the internal PartitionSchema functions.

This patch is WIP because I'm mostly looking for feedback on the approach
of adding the two new fields and its encoder/decoder functions. The new
client_schema parameter in PartitionSchema::FromPB() is necessary for
the RowOperationsPB decoder. For the call sites that don't provide an
explicit client schema, they use schema.CopyWithoutColumnIds(). I haven't
written any tests but would like some feedback about the viability of
using the schema without its columnIds as the client_schema.

I moved RowOperationsPB to a separate .proto file due to some circular
dependency issues between common.proto and wire_protocol.proto. Most of
the proto changes in this patch revolve around this change.

Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
---
M java/kudu-client/src/main/java/org/apache/kudu/client/Operation.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestOperation.java
M src/kudu/client/client-internal.cc
M src/kudu/client/scan_token-internal.cc
M src/kudu/common/CMakeLists.txt
M src/kudu/common/common.proto
M src/kudu/common/partition-test.cc
M src/kudu/common/partition.cc
M src/kudu/common/partition.h
M src/kudu/common/partition_pruner-test.cc
M src/kudu/common/partition_pruner.cc
M src/kudu/common/row_operations-test.cc
M src/kudu/common/row_operations.h
A src/kudu/common/row_operations.proto
M src/kudu/common/scan_spec-test.cc
M src/kudu/common/wire_protocol.proto
M src/kudu/integration-tests/alter_table-test.cc
M src/kudu/integration-tests/ts_tablet_manager-itest.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/master/master.proto
M src/kudu/master/master_path_handlers.cc
M src/kudu/master/sys_catalog.cc
M src/kudu/tablet/tablet-harness.h
M src/kudu/tablet/tablet_metadata.cc
M src/kudu/tools/tool_action_remote_replica.cc
M src/kudu/tserver/tablet_copy_client.cc
M src/kudu/tserver/tablet_server-test.cc
M src/kudu/tserver/tablet_service.cc
M src/kudu/tserver/tserver.proto
29 files changed, 466 insertions(+), 123 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/25/17025/3
-- 
To view, visit http://gerrit.cloudera.org:8080/17025
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
Gerrit-Change-Number: 17025
Gerrit-PatchSet: 3
Gerrit-Owner: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>

[kudu-CR] KUDU-2671: Adds new field to PartitionSchema.

Posted by "Mahesh Reddy (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Kudu Jenkins, Andrew Wong, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/17025

to look at the new patch set (#10).

Change subject: KUDU-2671: Adds new field to PartitionSchema.
......................................................................

KUDU-2671: Adds new field to PartitionSchema.

This patch introduces a new field to PartitionSchema that combines range bounds
and their respective hash bucket schemas. Any instance that assumes
the same hash schemas are used for each range will need this new field.
Some of the more important instances include partition pruning and many
of the internal PartitionSchema functions.

I moved RowOperationsPB to a separate .proto file due to some circular
dependency issues between common.proto and wire_protocol.proto. Most of
the proto changes in this patch revolve around this change.

Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
---
M java/kudu-client/src/main/java/org/apache/kudu/client/Operation.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestOperation.java
M src/kudu/client/scan_token-internal.cc
M src/kudu/common/CMakeLists.txt
M src/kudu/common/common.proto
M src/kudu/common/partition-test.cc
M src/kudu/common/partition.cc
M src/kudu/common/partition.h
M src/kudu/common/partition_pruner.cc
M src/kudu/common/row_operations-test.cc
M src/kudu/common/row_operations.h
A src/kudu/common/row_operations.proto
M src/kudu/common/wire_protocol.proto
M src/kudu/integration-tests/alter_table-test.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/master/master.proto
M src/kudu/master/sys_catalog.cc
M src/kudu/tablet/tablet_metadata.cc
M src/kudu/tserver/tablet_copy_client.cc
M src/kudu/tserver/tablet_server-test.cc
M src/kudu/tserver/tablet_service.cc
M src/kudu/tserver/tserver.proto
22 files changed, 440 insertions(+), 89 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/25/17025/10
-- 
To view, visit http://gerrit.cloudera.org:8080/17025
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
Gerrit-Change-Number: 17025
Gerrit-PatchSet: 10
Gerrit-Owner: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)

[kudu-CR] wip KUDU-2671: Adds new fields to PartitionSchema.

Posted by "Mahesh Reddy (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins, Andrew Wong, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/17025

to look at the new patch set (#4).

Change subject: wip KUDU-2671: Adds new fields to PartitionSchema.
......................................................................

wip KUDU-2671: Adds new fields to PartitionSchema.

This patch introduces two new fields to PartitionSchema, range bounds
and their respective hash bucket schemas. Any instance that assumes
the same hash schemas are used for each range will need these new fields.
Some of the more important instances include partition pruning and many
of the internal PartitionSchema functions.

This patch is WIP because I'm mostly looking for feedback on the approach
of adding the two new fields and its encoder/decoder functions. The new
client_schema parameter in PartitionSchema::FromPB() is necessary for
the RowOperationsPB decoder. For the call sites that don't provide an
explicit client schema, they use schema.CopyWithoutColumnIds(). I haven't
written any tests but would like some feedback about the viability of
using the schema without its columnIds as the client_schema.

I moved RowOperationsPB to a separate .proto file due to some circular
dependency issues between common.proto and wire_protocol.proto. Most of
the proto changes in this patch revolve around this change.

Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
---
M java/kudu-client/src/main/java/org/apache/kudu/client/Operation.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestOperation.java
M src/kudu/client/client-internal.cc
M src/kudu/client/scan_token-internal.cc
M src/kudu/common/CMakeLists.txt
M src/kudu/common/common.proto
M src/kudu/common/partition-test.cc
M src/kudu/common/partition.cc
M src/kudu/common/partition.h
M src/kudu/common/partition_pruner-test.cc
M src/kudu/common/partition_pruner.cc
M src/kudu/common/row_operations-test.cc
M src/kudu/common/row_operations.h
A src/kudu/common/row_operations.proto
M src/kudu/common/scan_spec-test.cc
M src/kudu/common/wire_protocol.proto
M src/kudu/integration-tests/alter_table-test.cc
M src/kudu/integration-tests/ts_tablet_manager-itest.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/master/master.proto
M src/kudu/master/master_path_handlers.cc
M src/kudu/master/sys_catalog.cc
M src/kudu/tablet/tablet-harness.h
M src/kudu/tablet/tablet_metadata.cc
M src/kudu/tools/tool_action_remote_replica.cc
M src/kudu/tserver/tablet_copy_client.cc
M src/kudu/tserver/tablet_server-test.cc
M src/kudu/tserver/tablet_service.cc
M src/kudu/tserver/tserver.proto
29 files changed, 307 insertions(+), 119 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/25/17025/4
-- 
To view, visit http://gerrit.cloudera.org:8080/17025
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
Gerrit-Change-Number: 17025
Gerrit-PatchSet: 4
Gerrit-Owner: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>

[kudu-CR] KUDU-2671: Adds new field to PartitionSchema.

Posted by "Mahesh Reddy (Code Review)" <ge...@cloudera.org>.
Mahesh Reddy has posted comments on this change. ( http://gerrit.cloudera.org:8080/17025 )

Change subject: KUDU-2671: Adds new field to PartitionSchema.
......................................................................


Patch Set 11:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/17025/11/src/kudu/common/partition-test.cc
File src/kudu/common/partition-test.cc:

http://gerrit.cloudera.org:8080/#/c/17025/11/src/kudu/common/partition-test.cc@1355
PS11, Line 1355:   CheckSerializationFunctions(pb, partition_schema, schema);
> This test verifies one specific partition schema. Could we call this from a
I can but the other tests with per-range hash schemas don't populate the new fields of PartitionSchemaPB so the new changes to the encoder/decoder function won't be tested. If that's something we're still interested in, I can call this from the other tests or create new tests with differently shaped schemas.


http://gerrit.cloudera.org:8080/#/c/17025/11/src/kudu/common/partition.cc
File src/kudu/common/partition.cc:

http://gerrit.cloudera.org:8080/#/c/17025/11/src/kudu/common/partition.cc@269
PS11, Line 269:   Arena arena(256);
> Can we only allocate this and run through the loop if `ranges_with_hash_sch
Done



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
Gerrit-Change-Number: 17025
Gerrit-PatchSet: 11
Gerrit-Owner: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Fri, 09 Apr 2021 23:27:16 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-2671: Adds new field to PartitionSchema.

Posted by "Mahesh Reddy (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Kudu Jenkins, Andrew Wong, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/17025

to look at the new patch set (#12).

Change subject: KUDU-2671: Adds new field to PartitionSchema.
......................................................................

KUDU-2671: Adds new field to PartitionSchema.

This patch introduces a new field to PartitionSchema that combines range bounds
and their respective hash bucket schemas. Any instance that assumes
the same hash schemas are used for each range will need this new field.
Some of the more important instances include partition pruning and many
of the internal PartitionSchema functions.

I moved RowOperationsPB to a separate .proto file due to some circular
dependency issues between common.proto and wire_protocol.proto. Most of
the proto changes in this patch revolve around this change.

Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
---
M java/kudu-client/src/main/java/org/apache/kudu/client/Operation.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestOperation.java
M src/kudu/client/scan_token-internal.cc
M src/kudu/common/CMakeLists.txt
M src/kudu/common/common.proto
M src/kudu/common/partition-test.cc
M src/kudu/common/partition.cc
M src/kudu/common/partition.h
M src/kudu/common/partition_pruner.cc
M src/kudu/common/row_operations-test.cc
M src/kudu/common/row_operations.h
A src/kudu/common/row_operations.proto
M src/kudu/common/wire_protocol.proto
M src/kudu/integration-tests/alter_table-test.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/master/master.proto
M src/kudu/master/sys_catalog.cc
M src/kudu/tablet/tablet_metadata.cc
M src/kudu/tserver/tablet_copy_client.cc
M src/kudu/tserver/tablet_server-test.cc
M src/kudu/tserver/tablet_service.cc
M src/kudu/tserver/tserver.proto
22 files changed, 451 insertions(+), 90 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/25/17025/12
-- 
To view, visit http://gerrit.cloudera.org:8080/17025
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
Gerrit-Change-Number: 17025
Gerrit-PatchSet: 12
Gerrit-Owner: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)

[kudu-CR] KUDU-2671: Adds new field to PartitionSchema.

Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/17025 )

Change subject: KUDU-2671: Adds new field to PartitionSchema.
......................................................................


Patch Set 13: Code-Review+2

(1 comment)

http://gerrit.cloudera.org:8080/#/c/17025/11/src/kudu/common/partition-test.cc
File src/kudu/common/partition-test.cc:

http://gerrit.cloudera.org:8080/#/c/17025/11/src/kudu/common/partition-test.cc@1355
PS11, Line 1355:   EXPECT_EQ(0, ranges_with_hash_schemas[2].hash_schemas.size
> That's essentially what CheckSerializationFunctions() does. It's just that 
Thanks, I appreciate the extra test coverage!



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
Gerrit-Change-Number: 17025
Gerrit-PatchSet: 13
Gerrit-Owner: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Wed, 14 Apr 2021 01:45:24 +0000
Gerrit-HasComments: Yes

[kudu-CR] wip KUDU-2671: Adds new fields to PartitionSchema.

Posted by "Mahesh Reddy (Code Review)" <ge...@cloudera.org>.
Mahesh Reddy has posted comments on this change. ( http://gerrit.cloudera.org:8080/17025 )

Change subject: wip KUDU-2671: Adds new fields to PartitionSchema.
......................................................................


Patch Set 2:

(7 comments)

mostly fixing test failures w/ 2nd patch, still need to look into RowOperationsPBDecoder allowing a client schema w/ column IDs more.

http://gerrit.cloudera.org:8080/#/c/17025/1//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/17025/1//COMMIT_MSG@9
PS1, Line 9: two new fields to PartitionSchema, range bounds
           : and their respective hash bucket schemas
> nit: seems like you've since merged these into one field, which I like.
Ack


http://gerrit.cloudera.org:8080/#/c/17025/1//COMMIT_MSG@20
PS1, Line 20: viability of
            : using the schema without its columnIds as the client_schema.
> I think this should be safe. The main point of distinction between 'client_
Ack


http://gerrit.cloudera.org:8080/#/c/17025/1/src/kudu/common/common.proto
File src/kudu/common/common.proto:

http://gerrit.cloudera.org:8080/#/c/17025/1/src/kudu/common/common.proto@356
PS1, Line 356:   // Each index of 'range_bounds' represents the upper and lower bounds of
             :   // ranges whose hash bucket schemas were s
> nit: should doc what these are and ordering requirements with respect to ea
Done


http://gerrit.cloudera.org:8080/#/c/17025/1/src/kudu/common/partition.h
File src/kudu/common/partition.h:

http://gerrit.cloudera.org:8080/#/c/17025/1/src/kudu/common/partition.h@176
PS1, Line 176: schema,
> It'd be great if you could add more context into how and in what context th
Currently, the RowOperationsPBDecoder constructor requires a client schema since it maps the client column indices to the server-side column indices. The two places where we have access to an explicit client schema is in CatalogManager, both in the create/alter table paths. The other use cases will always require a copy of the server schema without its column IDs. 

As for your idea of allowing the client schema to have column IDs and no-op the ClientServerMapping checks, I agree with the thesis that in the use cases where we don't have an explicit schema, using the same schema for both the server/client schema renders the Mapping useless. As for the implementation, I need to look into it further to ensure its viability.


http://gerrit.cloudera.org:8080/#/c/17025/1/src/kudu/common/partition.h@180
PS1, Line 180: rtitio
> nit: add docs for new fields
Done


http://gerrit.cloudera.org:8080/#/c/17025/1/src/kudu/common/partition.cc
File src/kudu/common/partition.cc:

http://gerrit.cloudera.org:8080/#/c/17025/1/src/kudu/common/partition.cc@256
PS1, Line 256:   hash_bucket_pb->set_num_buckets(hash_bucket.num_buckets);
> nit: should probably wrap all of this in an if (!ranges_with_hash_schemas.e
Done


http://gerrit.cloudera.org:8080/#/c/17025/1/src/kudu/common/partition.cc@262
PS1, Line 262: pb->mutable_range_bounds()->Reserve(ranges_with_hash_schemas_.size());
             :   }
> I forget if we've discussed this, but is it possible for either of these to
Currently, if the client doesn't specify a lower/upper bound for a range, the range's respective lower/upper bound is -Inf and +Inf. I haven't written any explicit tests for per-range hash schemas for unbounded ranges but given it's compatible with today's partitioning design I don't see why it wouldn't be. It wouldn't hurt to add tests for it though.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
Gerrit-Change-Number: 17025
Gerrit-PatchSet: 2
Gerrit-Owner: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Comment-Date: Wed, 10 Feb 2021 21:45:06 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-2671: Adds new field to PartitionSchema.

Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/17025 )

Change subject: KUDU-2671: Adds new field to PartitionSchema.
......................................................................


Patch Set 11: Code-Review+1

(2 comments)

http://gerrit.cloudera.org:8080/#/c/17025/11/src/kudu/common/partition-test.cc
File src/kudu/common/partition-test.cc:

http://gerrit.cloudera.org:8080/#/c/17025/11/src/kudu/common/partition-test.cc@1355
PS11, Line 1355:   CheckSerializationFunctions(pb, partition_schema, schema);
This test verifies one specific partition schema. Could we call this from a few of our other tests that have per-range hash schemas, at least to get some coverage of some other interestingly shaped schemas?


http://gerrit.cloudera.org:8080/#/c/17025/11/src/kudu/common/partition.cc
File src/kudu/common/partition.cc:

http://gerrit.cloudera.org:8080/#/c/17025/11/src/kudu/common/partition.cc@269
PS11, Line 269:   Arena arena(256);
Can we only allocate this and run through the loop if `ranges_with_hash_schemas_` is non-empty?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
Gerrit-Change-Number: 17025
Gerrit-PatchSet: 11
Gerrit-Owner: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Fri, 09 Apr 2021 20:56:32 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-2671: Adds new field to PartitionSchema.

Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/17025 )

Change subject: KUDU-2671: Adds new field to PartitionSchema.
......................................................................


Patch Set 12: Code-Review+1

(1 comment)

http://gerrit.cloudera.org:8080/#/c/17025/11/src/kudu/common/partition-test.cc
File src/kudu/common/partition-test.cc:

http://gerrit.cloudera.org:8080/#/c/17025/11/src/kudu/common/partition-test.cc@1355
PS11, Line 1355:   CheckSerializationFunctions(pb, partition_schema, schema);
> I can but the other tests with per-range hash schemas don't populate the ne
Yeah, maybe not. I'm thinking something more along the lines of:

pb = ToPB(partition_schema, schema);
partition_schema_deserialized = FromPB(pb, schema)
ASSERT_EQ(partition_schema_deserialized, partition_schema);



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
Gerrit-Change-Number: 17025
Gerrit-PatchSet: 12
Gerrit-Owner: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Tue, 13 Apr 2021 04:20:23 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-2671: Adds new field to PartitionSchema.

Posted by "Mahesh Reddy (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins, Andrew Wong, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/17025

to look at the new patch set (#9).

Change subject: KUDU-2671: Adds new field to PartitionSchema.
......................................................................

KUDU-2671: Adds new field to PartitionSchema.

This patch introduces a new field to PartitionSchema that combines range bounds
and their respective hash bucket schemas. Any instance that assumes
the same hash schemas are used for each range will need this new field.
Some of the more important instances include partition pruning and many
of the internal PartitionSchema functions.

I moved RowOperationsPB to a separate .proto file due to some circular
dependency issues between common.proto and wire_protocol.proto. Most of
the proto changes in this patch revolve around this change.

Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
---
M java/kudu-client/src/main/java/org/apache/kudu/client/Operation.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestOperation.java
M src/kudu/client/scan_token-internal.cc
M src/kudu/common/CMakeLists.txt
M src/kudu/common/common.proto
M src/kudu/common/partition-test.cc
M src/kudu/common/partition.cc
M src/kudu/common/partition.h
M src/kudu/common/partition_pruner.cc
M src/kudu/common/row_operations-test.cc
M src/kudu/common/row_operations.h
A src/kudu/common/row_operations.proto
M src/kudu/common/wire_protocol.proto
M src/kudu/integration-tests/alter_table-test.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/master/master.proto
M src/kudu/master/sys_catalog.cc
M src/kudu/tablet/tablet_metadata.cc
M src/kudu/tserver/tablet_copy_client.cc
M src/kudu/tserver/tablet_server-test.cc
M src/kudu/tserver/tablet_service.cc
M src/kudu/tserver/tserver.proto
22 files changed, 376 insertions(+), 85 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/25/17025/9
-- 
To view, visit http://gerrit.cloudera.org:8080/17025
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
Gerrit-Change-Number: 17025
Gerrit-PatchSet: 9
Gerrit-Owner: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>

[kudu-CR] KUDU-2671: Adds new field to PartitionSchema.

Posted by "Mahesh Reddy (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Kudu Jenkins, Andrew Wong, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/17025

to look at the new patch set (#11).

Change subject: KUDU-2671: Adds new field to PartitionSchema.
......................................................................

KUDU-2671: Adds new field to PartitionSchema.

This patch introduces a new field to PartitionSchema that combines range bounds
and their respective hash bucket schemas. Any instance that assumes
the same hash schemas are used for each range will need this new field.
Some of the more important instances include partition pruning and many
of the internal PartitionSchema functions.

I moved RowOperationsPB to a separate .proto file due to some circular
dependency issues between common.proto and wire_protocol.proto. Most of
the proto changes in this patch revolve around this change.

Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
---
M java/kudu-client/src/main/java/org/apache/kudu/client/Operation.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestOperation.java
M src/kudu/client/scan_token-internal.cc
M src/kudu/common/CMakeLists.txt
M src/kudu/common/common.proto
M src/kudu/common/partition-test.cc
M src/kudu/common/partition.cc
M src/kudu/common/partition.h
M src/kudu/common/partition_pruner.cc
M src/kudu/common/row_operations-test.cc
M src/kudu/common/row_operations.h
A src/kudu/common/row_operations.proto
M src/kudu/common/wire_protocol.proto
M src/kudu/integration-tests/alter_table-test.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/master/master.proto
M src/kudu/master/sys_catalog.cc
M src/kudu/tablet/tablet_metadata.cc
M src/kudu/tserver/tablet_copy_client.cc
M src/kudu/tserver/tablet_server-test.cc
M src/kudu/tserver/tablet_service.cc
M src/kudu/tserver/tserver.proto
22 files changed, 450 insertions(+), 89 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/25/17025/11
-- 
To view, visit http://gerrit.cloudera.org:8080/17025
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
Gerrit-Change-Number: 17025
Gerrit-PatchSet: 11
Gerrit-Owner: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)

[kudu-CR] KUDU-2671: Adds new field to PartitionSchema.

Posted by "Mahesh Reddy (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins, Andrew Wong, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/17025

to look at the new patch set (#8).

Change subject: KUDU-2671: Adds new field to PartitionSchema.
......................................................................

KUDU-2671: Adds new field to PartitionSchema.

This patch introduces a new field to PartitionSchema that combines range bounds
and their respective hash bucket schemas. Any instance that assumes
the same hash schemas are used for each range will need this new field.
Some of the more important instances include partition pruning and many
of the internal PartitionSchema functions.

I moved RowOperationsPB to a separate .proto file due to some circular
dependency issues between common.proto and wire_protocol.proto. Most of
the proto changes in this patch revolve around this change.

Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
---
M java/kudu-client/src/main/java/org/apache/kudu/client/Operation.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestOperation.java
M src/kudu/client/scan_token-internal.cc
M src/kudu/common/CMakeLists.txt
M src/kudu/common/common.proto
M src/kudu/common/partition.cc
M src/kudu/common/partition.h
M src/kudu/common/partition_pruner.cc
M src/kudu/common/row_operations-test.cc
M src/kudu/common/row_operations.h
A src/kudu/common/row_operations.proto
M src/kudu/common/wire_protocol.proto
M src/kudu/integration-tests/alter_table-test.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/master/master.proto
M src/kudu/master/sys_catalog.cc
M src/kudu/tablet/tablet_metadata.cc
M src/kudu/tserver/tablet_copy_client.cc
M src/kudu/tserver/tablet_server-test.cc
M src/kudu/tserver/tablet_service.cc
M src/kudu/tserver/tserver.proto
21 files changed, 258 insertions(+), 85 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/25/17025/8
-- 
To view, visit http://gerrit.cloudera.org:8080/17025
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
Gerrit-Change-Number: 17025
Gerrit-PatchSet: 8
Gerrit-Owner: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>

[kudu-CR] wip KUDU-2671: Adds new fields to PartitionSchema.

Posted by "Mahesh Reddy (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins, Andrew Wong, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/17025

to look at the new patch set (#6).

Change subject: wip KUDU-2671: Adds new fields to PartitionSchema.
......................................................................

wip KUDU-2671: Adds new fields to PartitionSchema.

This patch introduces two new fields to PartitionSchema, range bounds
and their respective hash bucket schemas. Any instance that assumes
the same hash schemas are used for each range will need these new fields.
Some of the more important instances include partition pruning and many
of the internal PartitionSchema functions.

This patch is WIP because I'm mostly looking for feedback on the approach
of adding the two new fields and its encoder/decoder functions. The new
client_schema parameter in PartitionSchema::FromPB() is necessary for
the RowOperationsPB decoder. For the call sites that don't provide an
explicit client schema, they use schema.CopyWithoutColumnIds(). I haven't
written any tests but would like some feedback about the viability of
using the schema without its columnIds as the client_schema.

I moved RowOperationsPB to a separate .proto file due to some circular
dependency issues between common.proto and wire_protocol.proto. Most of
the proto changes in this patch revolve around this change.

Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
---
M java/kudu-client/src/main/java/org/apache/kudu/client/Operation.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestOperation.java
M src/kudu/client/client-internal.cc
M src/kudu/client/scan_token-internal.cc
M src/kudu/common/CMakeLists.txt
M src/kudu/common/common.proto
M src/kudu/common/partition-test.cc
M src/kudu/common/partition.cc
M src/kudu/common/partition.h
M src/kudu/common/partition_pruner-test.cc
M src/kudu/common/partition_pruner.cc
M src/kudu/common/row_operations-test.cc
M src/kudu/common/row_operations.h
A src/kudu/common/row_operations.proto
M src/kudu/common/scan_spec-test.cc
M src/kudu/common/wire_protocol.proto
M src/kudu/integration-tests/alter_table-test.cc
M src/kudu/integration-tests/ts_tablet_manager-itest.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/master/master.proto
M src/kudu/master/master_path_handlers.cc
M src/kudu/master/sys_catalog.cc
M src/kudu/tablet/tablet-harness.h
M src/kudu/tablet/tablet_metadata.cc
M src/kudu/tools/tool_action_remote_replica.cc
M src/kudu/tserver/tablet_copy_client.cc
M src/kudu/tserver/tablet_server-test.cc
M src/kudu/tserver/tablet_service.cc
M src/kudu/tserver/tserver.proto
29 files changed, 309 insertions(+), 120 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/25/17025/6
-- 
To view, visit http://gerrit.cloudera.org:8080/17025
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
Gerrit-Change-Number: 17025
Gerrit-PatchSet: 6
Gerrit-Owner: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>

[kudu-CR] KUDU-2671: Adds new field to PartitionSchema.

Posted by "Mahesh Reddy (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Kudu Jenkins, Andrew Wong, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/17025

to look at the new patch set (#13).

Change subject: KUDU-2671: Adds new field to PartitionSchema.
......................................................................

KUDU-2671: Adds new field to PartitionSchema.

This patch introduces a new field to PartitionSchema that combines range bounds
and their respective hash bucket schemas. Any instance that assumes
the same hash schemas are used for each range will need this new field.
Some of the more important instances include partition pruning and many
of the internal PartitionSchema functions.

I moved RowOperationsPB to a separate .proto file due to some circular
dependency issues between common.proto and wire_protocol.proto. Most of
the proto changes in this patch revolve around this change.

Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
---
M java/kudu-client/src/main/java/org/apache/kudu/client/Operation.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestOperation.java
M src/kudu/client/scan_token-internal.cc
M src/kudu/common/CMakeLists.txt
M src/kudu/common/common.proto
M src/kudu/common/partition-test.cc
M src/kudu/common/partition.cc
M src/kudu/common/partition.h
M src/kudu/common/partition_pruner.cc
M src/kudu/common/row_operations-test.cc
M src/kudu/common/row_operations.h
A src/kudu/common/row_operations.proto
M src/kudu/common/wire_protocol.proto
M src/kudu/integration-tests/alter_table-test.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/master/master.proto
M src/kudu/master/sys_catalog.cc
M src/kudu/tablet/tablet_metadata.cc
M src/kudu/tserver/tablet_copy_client.cc
M src/kudu/tserver/tablet_server-test.cc
M src/kudu/tserver/tablet_service.cc
M src/kudu/tserver/tserver.proto
22 files changed, 453 insertions(+), 90 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/25/17025/13
-- 
To view, visit http://gerrit.cloudera.org:8080/17025
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
Gerrit-Change-Number: 17025
Gerrit-PatchSet: 13
Gerrit-Owner: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)

[kudu-CR] KUDU-2671: Adds new field to PartitionSchema.

Posted by "Mahesh Reddy (Code Review)" <ge...@cloudera.org>.
Mahesh Reddy has posted comments on this change. ( http://gerrit.cloudera.org:8080/17025 )

Change subject: KUDU-2671: Adds new field to PartitionSchema.
......................................................................


Patch Set 10:

(11 comments)

http://gerrit.cloudera.org:8080/#/c/17025/9/src/kudu/client/scan_token-internal.cc
File src/kudu/client/scan_token-internal.cc:

http://gerrit.cloudera.org:8080/#/c/17025/9/src/kudu/client/scan_token-internal.cc@345
PS9, Line 345: &partition_schema_pb)
> nit: &partition_schema_pb is an argument of ToPB(), so it should be aligned
Done


http://gerrit.cloudera.org:8080/#/c/17025/9/src/kudu/common/partition-test.cc
File src/kudu/common/partition-test.cc:

PS9: 
> Could you add some negative tests for malformed partition schemas too?
Ack


http://gerrit.cloudera.org:8080/#/c/17025/9/src/kudu/common/partition-test.cc@1300
PS9, Line 1300:     pb.add_range_hash_schemas();
> warning: unused variable 'range_hash_component' [clang-diagnostic-unused-va
Ack


http://gerrit.cloudera.org:8080/#/c/17025/9/src/kudu/common/partition-test.cc@1303
PS9, Line 1303:   PartitionSchema partition_schema;
              :   ASSERT_OK(PartitionSchema::FromPB(pb, schema, &partition_schema));
> nit: would it make sense to define some helper function that takes a Partit
hm I could but then there would be less flexibility since the PartitionSchemaPB would have to be the same protobuf since the equality checks on the fields are specific to this protobuf. If that's something we're still interested in I can move a bulk of this code to a helper function.


http://gerrit.cloudera.org:8080/#/c/17025/9/src/kudu/common/partition-test.cc@1347
PS9, Line 1347:   ASSERT_TRUE(partition_schema.Equals(partition_schema1));
> nit: use ASSERT_TRUE() for this
Done


http://gerrit.cloudera.org:8080/#/c/17025/9/src/kudu/common/partition.cc
File src/kudu/common/partition.cc:

http://gerrit.cloudera.org:8080/#/c/17025/9/src/kudu/common/partition.cc@204
PS9, Line 204:     if (ops.size() != 2) {
> In a valid message, do we ever expect there to be more than two ops? If not
nope, there should only be two ops, I can modify the code to return an error if ops.size() != 2. I agree that ops[0] should always be the lower bound and ops[1] be the upper bound, but similar protections exist in the CatalogManager where a check exists to verify that ops[1] is indeed the upper bound.

I can add the size check for now, we can discuss further about assuming ops[0] is the lower bound and ops[1] is the upper bound.


http://gerrit.cloudera.org:8080/#/c/17025/9/src/kudu/common/partition.cc@209
PS9, Line 209: 
> The ToPB method seems to only have RANGE_LOWER_BOUND and RANGE_UPPER_BOUND.
We would still need the EXCLUSIVE/INCLUSIVE enums in the case that FromPB is decoding a protobuf message from the client. This happens in the catalog_manager in both the create table and alter table paths.


http://gerrit.cloudera.org:8080/#/c/17025/9/src/kudu/common/partition.cc@213
PS9, Line 213: op
> nit: add a space
Done


http://gerrit.cloudera.org:8080/#/c/17025/9/src/kudu/common/partition.cc@216
PS9, Line 216: 
             :         // Lower bound range partition keys are inclusive and upper bound range partition keys
             :         // are exclusive by design. If the provided keys are not of this format, these keys
             :         // will be transformed to their proper format.
             :         if (op1.type == RowOperationsPB::EXCLUSIVE_RANGE_LOWER_BOUND) {
             :           RETURN_NOT_OK(partition_schema->MakeLowerBoundRangePartitionKeyInclusive(
             :               op1.split_row.get()));
             :         }
             :         if 
> Why don't we need to do anything in the RANGE_LOWER_BOUND or RANGE_UPPER_BO
Lower bound range partition keys are inclusive and upper bound range partition keys are exclusive by design, so in the cases that they are not (EXCLUSIVE_RANGE_LOWER_BOUND and INCLUSIVE_RANGE_UPPER_BOUND), some work is required to transform the partition keys.

For the RANGE_LOWER_BOUND and RANGE_UPPER_BOUND cases, the keys are already inclusive and exclusive respectively so no extra work is required in these cases. I can add a comment effectively summarizing this.


http://gerrit.cloudera.org:8080/#/c/17025/9/src/kudu/common/partition.cc@249
PS9, Line 249: 
             :   if (!range_bounds.empty()) {
             :     RETURN_NOT_OK(partition_schema->EncodeRangeBoun
> nit: spacing
Done


http://gerrit.cloudera.org:8080/#/c/17025/9/src/kudu/common/partition.cc@274
PS9, Line 274:     RowOperationsPBEn
> I'm curious if there are performance implications of allocating this repeat
Yep I can use the same object and reset it every iteration.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
Gerrit-Change-Number: 17025
Gerrit-PatchSet: 10
Gerrit-Owner: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Wed, 31 Mar 2021 01:06:32 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-2671: Adds new field to PartitionSchema.

Posted by "Mahesh Reddy (Code Review)" <ge...@cloudera.org>.
Mahesh Reddy has posted comments on this change. ( http://gerrit.cloudera.org:8080/17025 )

Change subject: KUDU-2671: Adds new field to PartitionSchema.
......................................................................


Patch Set 8:

> Uploaded patch set 8.

Ran into some issues w the decoder/encoder functions while writing test for partition pruning. This patch set updates these functions.


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
Gerrit-Change-Number: 17025
Gerrit-PatchSet: 8
Gerrit-Owner: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Comment-Date: Fri, 26 Mar 2021 00:14:43 +0000
Gerrit-HasComments: No

[kudu-CR] wip KUDU-2671: Adds new fields to PartitionSchema.

Posted by "Mahesh Reddy (Code Review)" <ge...@cloudera.org>.
Mahesh Reddy has posted comments on this change. ( http://gerrit.cloudera.org:8080/17025 )

Change subject: wip KUDU-2671: Adds new fields to PartitionSchema.
......................................................................


Patch Set 3:

(1 comment)

> Uploaded patch set 3.

http://gerrit.cloudera.org:8080/#/c/17025/3/src/kudu/common/partition-test.cc
File src/kudu/common/partition-test.cc:

http://gerrit.cloudera.org:8080/#/c/17025/3/src/kudu/common/partition-test.cc@1102
PS3, Line 1102: TestVaryingHashSchemasPerUnboundedRanges
> Is this related to the new fields in PartitionSchema? If not, how about we 
Good point, I can move this test and its corresponding changes to a different patch.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
Gerrit-Change-Number: 17025
Gerrit-PatchSet: 3
Gerrit-Owner: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Comment-Date: Fri, 19 Feb 2021 22:07:50 +0000
Gerrit-HasComments: Yes

[kudu-CR] wip KUDU-2671: Adds new fields to PartitionSchema.

Posted by "Mahesh Reddy (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins, Andrew Wong, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/17025

to look at the new patch set (#2).

Change subject: wip KUDU-2671: Adds new fields to PartitionSchema.
......................................................................

wip KUDU-2671: Adds new fields to PartitionSchema.

This patch introduces two new fields to PartitionSchema, range bounds
and their respective hash bucket schemas. Any instance that assumes
the same hash schemas are used for each range will need these new fields.
Some of the more important instances include partition pruning and many
of the internal PartitionSchema functions.

This patch is WIP because I'm mostly looking for feedback on the approach
of adding the two new fields and its encoder/decoder functions. The new
client_schema parameter in PartitionSchema::FromPB() is necessary for
the RowOperationsPB decoder. For the call sites that don't provide an
explicit client schema, they use schema.CopyWithoutColumnIds(). I haven't
written any tests but would like some feedback about the viability of
using the schema without its columnIds as the client_schema.

I moved RowOperationsPB to a separate .proto file due to some circular
dependency issues between common.proto and wire_protocol.proto. Most of
the proto changes in this patch revolve around this change.

Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
---
M java/kudu-client/src/main/java/org/apache/kudu/client/Operation.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestOperation.java
M src/kudu/client/client-internal.cc
M src/kudu/client/scan_token-internal.cc
M src/kudu/common/CMakeLists.txt
M src/kudu/common/common.proto
M src/kudu/common/partition-test.cc
M src/kudu/common/partition.cc
M src/kudu/common/partition.h
M src/kudu/common/partition_pruner-test.cc
M src/kudu/common/partition_pruner.cc
M src/kudu/common/row_operations-test.cc
M src/kudu/common/row_operations.h
A src/kudu/common/row_operations.proto
M src/kudu/common/scan_spec-test.cc
M src/kudu/common/wire_protocol.proto
M src/kudu/integration-tests/alter_table-test.cc
M src/kudu/integration-tests/ts_tablet_manager-itest.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/master/master.proto
M src/kudu/master/master_path_handlers.cc
M src/kudu/master/sys_catalog.cc
M src/kudu/tablet/tablet-harness.h
M src/kudu/tablet/tablet_metadata.cc
M src/kudu/tools/tool_action_remote_replica.cc
M src/kudu/tserver/tablet_copy_client.cc
M src/kudu/tserver/tablet_server-test.cc
M src/kudu/tserver/tablet_service.cc
M src/kudu/tserver/tserver.proto
29 files changed, 306 insertions(+), 118 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/25/17025/2
-- 
To view, visit http://gerrit.cloudera.org:8080/17025
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
Gerrit-Change-Number: 17025
Gerrit-PatchSet: 2
Gerrit-Owner: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)

[kudu-CR] wip KUDU-2671: Adds new fields to PartitionSchema.

Posted by "Mahesh Reddy (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins, Andrew Wong, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/17025

to look at the new patch set (#7).

Change subject: wip KUDU-2671: Adds new fields to PartitionSchema.
......................................................................

wip KUDU-2671: Adds new fields to PartitionSchema.

This patch introduces two new fields to PartitionSchema, range bounds
and their respective hash bucket schemas. Any instance that assumes
the same hash schemas are used for each range will need these new fields.
Some of the more important instances include partition pruning and many
of the internal PartitionSchema functions.

This patch is WIP because I'm mostly looking for feedback on the approach
of adding the two new fields and its encoder/decoder functions. The new
client_schema parameter in PartitionSchema::FromPB() is necessary for
the RowOperationsPB decoder. For the call sites that don't provide an
explicit client schema, they use schema.CopyWithoutColumnIds(). I haven't
written any tests but would like some feedback about the viability of
using the schema without its columnIds as the client_schema.

I moved RowOperationsPB to a separate .proto file due to some circular
dependency issues between common.proto and wire_protocol.proto. Most of
the proto changes in this patch revolve around this change.

Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
---
M java/kudu-client/src/main/java/org/apache/kudu/client/Operation.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestOperation.java
M src/kudu/client/scan_token-internal.cc
M src/kudu/common/CMakeLists.txt
M src/kudu/common/common.proto
M src/kudu/common/partition.cc
M src/kudu/common/partition.h
M src/kudu/common/partition_pruner.cc
M src/kudu/common/row_operations-test.cc
M src/kudu/common/row_operations.h
A src/kudu/common/row_operations.proto
M src/kudu/common/wire_protocol.proto
M src/kudu/integration-tests/alter_table-test.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/master/master.proto
M src/kudu/master/sys_catalog.cc
M src/kudu/tablet/tablet_metadata.cc
M src/kudu/tserver/tablet_copy_client.cc
M src/kudu/tserver/tablet_server-test.cc
M src/kudu/tserver/tablet_service.cc
M src/kudu/tserver/tserver.proto
21 files changed, 257 insertions(+), 85 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/25/17025/7
-- 
To view, visit http://gerrit.cloudera.org:8080/17025
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
Gerrit-Change-Number: 17025
Gerrit-PatchSet: 7
Gerrit-Owner: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>

[kudu-CR] KUDU-2671: Adds new field to PartitionSchema.

Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/17025 )

Change subject: KUDU-2671: Adds new field to PartitionSchema.
......................................................................


Patch Set 9:

(10 comments)

http://gerrit.cloudera.org:8080/#/c/17025/9/src/kudu/client/scan_token-internal.cc
File src/kudu/client/scan_token-internal.cc:

http://gerrit.cloudera.org:8080/#/c/17025/9/src/kudu/client/scan_token-internal.cc@345
PS9, Line 345:                      
nit: &partition_schema_pb is an argument of ToPB(), so it should be aligned as such.


http://gerrit.cloudera.org:8080/#/c/17025/9/src/kudu/common/partition-test.cc
File src/kudu/common/partition-test.cc:

PS9: 
Could you add some negative tests for malformed partition schemas too?


http://gerrit.cloudera.org:8080/#/c/17025/9/src/kudu/common/partition-test.cc@1303
PS9, Line 1303:   PartitionSchema partition_schema;
              :   ASSERT_OK(PartitionSchema::FromPB(pb, schema, &partition_schema));
nit: would it make sense to define some helper function that takes a PartitionSchemaPB and does this deserialize/serialize/deserialize dance and equality checks? Maybe we could use that in some of the other tests for some extra validation


http://gerrit.cloudera.org:8080/#/c/17025/9/src/kudu/common/partition-test.cc@1347
PS9, Line 1347:   ASSERT_EQ(true, partition_schema.Equals(partition_schema1));
nit: use ASSERT_TRUE() for this


http://gerrit.cloudera.org:8080/#/c/17025/9/src/kudu/common/partition.cc
File src/kudu/common/partition.cc:

http://gerrit.cloudera.org:8080/#/c/17025/9/src/kudu/common/partition.cc@204
PS9, Line 204:     for (int j = 0; j < ops.size(); j++) {
In a valid message, do we ever expect there to be more than two ops? If not, could we return an error if ops.size() isn't 2? If so, could we also assume ops[0] is the RANGE_LOWER_BOUND and ops[1] is the RANGE_UPPER_BOUND? That might make this code block a bit easier to read.


http://gerrit.cloudera.org:8080/#/c/17025/9/src/kudu/common/partition.cc@209
PS9, Line 209: EXCLUSIVE_RANGE_LOWER_BOUND
The ToPB method seems to only have RANGE_LOWER_BOUND and RANGE_UPPER_BOUND. Do we actually need the EXCLUSIVE/INCLUSIVE enums here?


http://gerrit.cloudera.org:8080/#/c/17025/9/src/kudu/common/partition.cc@213
PS9, Line 213:   
nit: add a space


http://gerrit.cloudera.org:8080/#/c/17025/9/src/kudu/common/partition.cc@216
PS9, Line 216: 
             :           if (op.type == RowOperationsPB::EXCLUSIVE_RANGE_LOWER_BOUND) {
             :             RETURN_NOT_OK(partition_schema->MakeLowerBoundRangePartitionKeyInclusive(
             :                 op.split_row.get()));
             :           }
             :           if (ops[j].type == RowOperationsPB::INCLUSIVE_RANGE_UPPER_BOUND) {
             :             RETURN_NOT_OK(partition_schema->MakeUpperBoundRangePartitionKeyExclusive(
             :                 ops[j].split_row.get()));
             :           }
Why don't we need to do anything in the RANGE_LOWER_BOUND or RANGE_UPPER_BOUND cases? Could use a comment.


http://gerrit.cloudera.org:8080/#/c/17025/9/src/kudu/common/partition.cc@249
PS9, Line 249: RETURN_NOT_OK(
             :         partition_schema->EncodeRangeBounds(range_bounds, range_hash_schema, schema,
             :                                             &partit
nit: spacing


http://gerrit.cloudera.org:8080/#/c/17025/9/src/kudu/common/partition.cc@274
PS9, Line 274:     Arena arena(256);
I'm curious if there are performance implications of allocating this repeatedly. Is it possible to / would it make sense to reset and reuse the same arena?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
Gerrit-Change-Number: 17025
Gerrit-PatchSet: 9
Gerrit-Owner: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Tue, 30 Mar 2021 07:29:03 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-2671: Adds new field to PartitionSchema.

Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/17025 )

Change subject: KUDU-2671: Adds new field to PartitionSchema.
......................................................................


Patch Set 10:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/17025/9/src/kudu/common/partition-test.cc
File src/kudu/common/partition-test.cc:

http://gerrit.cloudera.org:8080/#/c/17025/9/src/kudu/common/partition-test.cc@1303
PS9, Line 1303:   PartitionSchema partition_schema;
              :   ASSERT_OK(PartitionSchema::FromPB(pb, schema, &partition_schema));
> hm I could but then there would be less flexibility since the PartitionSche
I meant in addition to the checks on these fields, doing another verification of deserialization/serialization, especially because we can drop it into other test cases easily.


http://gerrit.cloudera.org:8080/#/c/17025/9/src/kudu/common/partition.cc
File src/kudu/common/partition.cc:

http://gerrit.cloudera.org:8080/#/c/17025/9/src/kudu/common/partition.cc@204
PS9, Line 204:     if (ops.size() != 2) {
> nope, there should only be two ops, I can modify the code to return an erro
Seems like we make that assumption here: https://github.com/apache/kudu/blob/master/src/kudu/master/catalog_manager.cc#L2462

I suppose it's a different area of code, but since these rows are coming from clients, we have control over it anyway.


http://gerrit.cloudera.org:8080/#/c/17025/10/src/kudu/common/partition.cc
File src/kudu/common/partition.cc:

http://gerrit.cloudera.org:8080/#/c/17025/10/src/kudu/common/partition.cc@205
PS10, Line 205: ("Only two ops are expected for this pair of range bounds.");
nit: maybe also mention how many there are?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
Gerrit-Change-Number: 17025
Gerrit-PatchSet: 10
Gerrit-Owner: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Wed, 31 Mar 2021 18:25:57 +0000
Gerrit-HasComments: Yes

[kudu-CR] wip KUDU-2671: Adds new fields to PartitionSchema.

Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/17025 )

Change subject: wip KUDU-2671: Adds new fields to PartitionSchema.
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/17025/3/src/kudu/common/partition-test.cc
File src/kudu/common/partition-test.cc:

http://gerrit.cloudera.org:8080/#/c/17025/3/src/kudu/common/partition-test.cc@1102
PS3, Line 1102: TestVaryingHashSchemasPerUnboundedRanges
Is this related to the new fields in PartitionSchema? If not, how about we put this in a different patch?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
Gerrit-Change-Number: 17025
Gerrit-PatchSet: 3
Gerrit-Owner: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Comment-Date: Fri, 19 Feb 2021 21:03:50 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-2671: Adds new field to PartitionSchema.

Posted by "Mahesh Reddy (Code Review)" <ge...@cloudera.org>.
Mahesh Reddy has posted comments on this change. ( http://gerrit.cloudera.org:8080/17025 )

Change subject: KUDU-2671: Adds new field to PartitionSchema.
......................................................................


Patch Set 9:

> Uploaded patch set 9.

Added test to verify new changes to encoder/decoder function.


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
Gerrit-Change-Number: 17025
Gerrit-PatchSet: 9
Gerrit-Owner: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Comment-Date: Tue, 30 Mar 2021 05:53:53 +0000
Gerrit-HasComments: No

[kudu-CR] KUDU-2671: Adds new field to PartitionSchema.

Posted by "Mahesh Reddy (Code Review)" <ge...@cloudera.org>.
Mahesh Reddy has posted comments on this change. ( http://gerrit.cloudera.org:8080/17025 )

Change subject: KUDU-2671: Adds new field to PartitionSchema.
......................................................................


Patch Set 12:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/17025/11/src/kudu/common/partition-test.cc
File src/kudu/common/partition-test.cc:

http://gerrit.cloudera.org:8080/#/c/17025/11/src/kudu/common/partition-test.cc@1355
PS11, Line 1355:   CheckSerializationFunctions(pb, partition_schema, schema);
> Yeah, maybe not. I'm thinking something more along the lines of:
That's essentially what CheckSerializationFunctions() does. It's just that the new fields of PartitionSchemaPB are not populated in other tests so the new changes to the encoder/decoder function will not be tested in those tests. But I can still go ahead and call this from other tests.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
Gerrit-Change-Number: 17025
Gerrit-PatchSet: 12
Gerrit-Owner: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Tue, 13 Apr 2021 18:13:52 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-2671: Adds new field to PartitionSchema.

Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/17025 )

Change subject: KUDU-2671: Adds new field to PartitionSchema.
......................................................................

KUDU-2671: Adds new field to PartitionSchema.

This patch introduces a new field to PartitionSchema that combines range bounds
and their respective hash bucket schemas. Any instance that assumes
the same hash schemas are used for each range will need this new field.
Some of the more important instances include partition pruning and many
of the internal PartitionSchema functions.

I moved RowOperationsPB to a separate .proto file due to some circular
dependency issues between common.proto and wire_protocol.proto. Most of
the proto changes in this patch revolve around this change.

Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
Reviewed-on: http://gerrit.cloudera.org:8080/17025
Tested-by: Kudu Jenkins
Reviewed-by: Andrew Wong <aw...@cloudera.com>
---
M java/kudu-client/src/main/java/org/apache/kudu/client/Operation.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestOperation.java
M src/kudu/client/scan_token-internal.cc
M src/kudu/common/CMakeLists.txt
M src/kudu/common/common.proto
M src/kudu/common/partition-test.cc
M src/kudu/common/partition.cc
M src/kudu/common/partition.h
M src/kudu/common/partition_pruner.cc
M src/kudu/common/row_operations-test.cc
M src/kudu/common/row_operations.h
A src/kudu/common/row_operations.proto
M src/kudu/common/wire_protocol.proto
M src/kudu/integration-tests/alter_table-test.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/master/master.proto
M src/kudu/master/sys_catalog.cc
M src/kudu/tablet/tablet_metadata.cc
M src/kudu/tserver/tablet_copy_client.cc
M src/kudu/tserver/tablet_server-test.cc
M src/kudu/tserver/tablet_service.cc
M src/kudu/tserver/tserver.proto
22 files changed, 453 insertions(+), 90 deletions(-)

Approvals:
  Kudu Jenkins: Verified
  Andrew Wong: Looks good to me, approved

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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic5d8615ab9967fdb40292b9c77eb68a19baeca1d
Gerrit-Change-Number: 17025
Gerrit-PatchSet: 14
Gerrit-Owner: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Tidy Bot (241)