You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Mike Percy (Code Review)" <ge...@cloudera.org> on 2019/01/09 22:30:50 UTC

[kudu-CR] WIP: tablet: Add support for virtual columns to Schema

Mike Percy has uploaded this change for review. ( http://gerrit.cloudera.org:8080/12204


Change subject: WIP: tablet: Add support for virtual columns to Schema
......................................................................

WIP: tablet: Add support for virtual columns to Schema

Needs tests

Change-Id: I06a69ab9d65245e25b1a955765a3a1ebdb9655d3
---
M src/kudu/common/schema.cc
1 file changed, 13 insertions(+), 2 deletions(-)



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I06a69ab9d65245e25b1a955765a3a1ebdb9655d3
Gerrit-Change-Number: 12204
Gerrit-PatchSet: 1
Gerrit-Owner: Mike Percy <mp...@apache.org>

[kudu-CR] KUDU-2645: schema: Add support for virtual columns in projections

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

Change subject: KUDU-2645: schema: Add support for virtual columns in projections
......................................................................

KUDU-2645: schema: Add support for virtual columns in projections

* Do not validate that virtual columns appearing in a user projection
  also appear in the tablet schema because virtual columns are not
  physically present and so should never appear in a tablet schema.
* Generate artificial column ids for virtual columns so that we can map
  the virtual columns onto a scanner schema that includes column ids,
  like a tablet iterator. Schemas have the invariant that either there
  are no column ids present in a schema or all columns in the schema are
  mapped to a column id.

This patch adds a simple unit test for Schema::GetMappedReadProjection()
that includes the use of a virtual column.

Change-Id: I06a69ab9d65245e25b1a955765a3a1ebdb9655d3
Reviewed-on: http://gerrit.cloudera.org:8080/12204
Reviewed-by: Adar Dembo <ad...@cloudera.com>
Tested-by: Kudu Jenkins
---
M src/kudu/common/schema-test.cc
M src/kudu/common/schema.cc
2 files changed, 46 insertions(+), 1 deletion(-)

Approvals:
  Adar Dembo: Looks good to me, approved
  Kudu Jenkins: Verified

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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I06a69ab9d65245e25b1a955765a3a1ebdb9655d3
Gerrit-Change-Number: 12204
Gerrit-PatchSet: 6
Gerrit-Owner: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>

[kudu-CR] KUDU-2645: schema: Add support for virtual columns in projections

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

Change subject: KUDU-2645: schema: Add support for virtual columns in projections
......................................................................


Patch Set 4:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/12204/4/src/kudu/common/schema-test.cc
File src/kudu/common/schema-test.cc:

http://gerrit.cloudera.org:8080/#/c/12204/4/src/kudu/common/schema-test.cc@449
PS4, Line 449:   ASSERT_TRUE(mapped.has_column_ids());
Maybe also assert that 'mapped' isn't equal to 'projection', since 'mapped' should has column IDs? Or do you think this about covers that?


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

http://gerrit.cloudera.org:8080/#/c/12204/4/src/kudu/common/schema.cc@402
PS4, Line 402:     if (col.type_info()->is_virtual()) {
Should we DCHECK that, if col is virtual, it explicitly _is not_ in this schema?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I06a69ab9d65245e25b1a955765a3a1ebdb9655d3
Gerrit-Change-Number: 12204
Gerrit-PatchSet: 4
Gerrit-Owner: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Wed, 13 Feb 2019 04:34:05 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-2645: schema: Add support for virtual columns in projections

Posted by "Mike Percy (Code Review)" <ge...@cloudera.org>.
Hello Will Berkeley, Kudu Jenkins, Adar Dembo, 

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

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

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

Change subject: KUDU-2645: schema: Add support for virtual columns in projections
......................................................................

KUDU-2645: schema: Add support for virtual columns in projections

* Do not validate that virtual columns appearing in a user projection
  also appear in the tablet schema because virtual columns are not
  physically present and so should never appear in a tablet schema.
* Generate artificial column ids for virtual columns so that we can map
  the virtual columns onto a scanner schema that includes column ids,
  like a tablet iterator. Schemas have the invariant that either there
  are no column ids present in a schema or all columns in the schema are
  mapped to a column id.

This patch adds a simple unit test for Schema::GetMappedReadProjection()
that includes the use of a virtual column.

Change-Id: I06a69ab9d65245e25b1a955765a3a1ebdb9655d3
---
M src/kudu/common/schema-test.cc
M src/kudu/common/schema.cc
2 files changed, 46 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/04/12204/5
-- 
To view, visit http://gerrit.cloudera.org:8080/12204
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I06a69ab9d65245e25b1a955765a3a1ebdb9655d3
Gerrit-Change-Number: 12204
Gerrit-PatchSet: 5
Gerrit-Owner: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>

[kudu-CR] KUDU-2645: schema: Add support for virtual columns in projections

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

Change subject: KUDU-2645: schema: Add support for virtual columns in projections
......................................................................


Patch Set 4:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/12204/4/src/kudu/common/schema-test.cc
File src/kudu/common/schema-test.cc:

http://gerrit.cloudera.org:8080/#/c/12204/4/src/kudu/common/schema-test.cc@449
PS4, Line 449:   ASSERT_TRUE(mapped.has_column_ids());
> Maybe also assert that 'mapped' isn't equal to 'projection', since 'mapped'
Sure, it doesn't hurt to add that.


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

http://gerrit.cloudera.org:8080/#/c/12204/4/src/kudu/common/schema.cc@402
PS4, Line 402:     if (col.type_info()->is_virtual()) {
> Should we DCHECK that, if col is virtual, it explicitly _is not_ in this sc
Done



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I06a69ab9d65245e25b1a955765a3a1ebdb9655d3
Gerrit-Change-Number: 12204
Gerrit-PatchSet: 4
Gerrit-Owner: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Thu, 28 Feb 2019 00:10:45 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-2645: schema: Add support for virtual columns in projections

Posted by "Mike Percy (Code Review)" <ge...@cloudera.org>.
Hello Will Berkeley, Kudu Jenkins, Adar Dembo, 

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

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

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

Change subject: KUDU-2645: schema: Add support for virtual columns in projections
......................................................................

KUDU-2645: schema: Add support for virtual columns in projections

* Do not validate that virtual columns appearing in a user projection
  also appear in the tablet schema because virtual columns are not
  physically present and so should never appear in a tablet schema.
* Generate artificial column ids for virtual columns so that we can map
  the virtual columns onto a scanner schema that includes column ids,
  like a tablet iterator. Schemas have the invariant that either there
  are no column ids present in a schema or all columns in the schema are
  mapped to a column id.

This patch adds a simple unit test for Schema::GetMappedReadProjection()
that includes the use of a virtual column.

Change-Id: I06a69ab9d65245e25b1a955765a3a1ebdb9655d3
---
M src/kudu/common/schema-test.cc
M src/kudu/common/schema.cc
2 files changed, 44 insertions(+), 1 deletion(-)


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I06a69ab9d65245e25b1a955765a3a1ebdb9655d3
Gerrit-Change-Number: 12204
Gerrit-PatchSet: 2
Gerrit-Owner: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>

[kudu-CR] KUDU-2645: schema: Add support for virtual columns in projections

Posted by "Mike Percy (Code Review)" <ge...@cloudera.org>.
Mike Percy has removed a vote on this change.

Change subject: KUDU-2645: schema: Add support for virtual columns in projections
......................................................................


Removed Verified-1 by Kudu Jenkins (120)
-- 
To view, visit http://gerrit.cloudera.org:8080/12204
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: deleteVote
Gerrit-Change-Id: I06a69ab9d65245e25b1a955765a3a1ebdb9655d3
Gerrit-Change-Number: 12204
Gerrit-PatchSet: 4
Gerrit-Owner: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>

[kudu-CR] KUDU-2645: schema: Add support for virtual columns in projections

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

Change subject: KUDU-2645: schema: Add support for virtual columns in projections
......................................................................


Patch Set 4: Verified+1

Overriding unrelated test failure due to KUDU-2694


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I06a69ab9d65245e25b1a955765a3a1ebdb9655d3
Gerrit-Change-Number: 12204
Gerrit-PatchSet: 4
Gerrit-Owner: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Sat, 09 Feb 2019 19:56:52 +0000
Gerrit-HasComments: No

[kudu-CR] KUDU-2645: schema: Add support for virtual columns in projections

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

Change subject: KUDU-2645: schema: Add support for virtual columns in projections
......................................................................


Patch Set 5: Code-Review+2


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I06a69ab9d65245e25b1a955765a3a1ebdb9655d3
Gerrit-Change-Number: 12204
Gerrit-PatchSet: 5
Gerrit-Owner: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Thu, 28 Feb 2019 00:41:28 +0000
Gerrit-HasComments: No