You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Todd Lipcon (Code Review)" <ge...@cloudera.org> on 2019/06/13 18:22:39 UTC

[kudu-CR] KUDU-2846 (part 2): optimize IS [NOT] NULL predicates

Hello Will Berkeley, Andrew Wong,

I'd like you to do a code review. Please visit

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

to review the following change.


Change subject: KUDU-2846 (part 2): optimize IS [NOT] NULL predicates
......................................................................

KUDU-2846 (part 2): optimize IS [NOT] NULL predicates

This does a simple optimization to use bitwise ops on the selection and
null vectors to implement NOT NULL and NULL, rather than the current
branchy code. The speedup is about 75x.

Before:
  int32  NULL       (c IS NULL) 615.9M evals/sec       4.54 cycles/eval
  int32  NOT NULL   (c IS NOT NULL) 636.3M evals/sec   4.39 cycles/eval
  int32  NULL       (c IS NOT NULL) 645.3M evals/sec   4.33 cycles/eval

After:
  int32  NULL       (c IS NULL) 46811.4M evals/sec     0.03 cycles/eval
  int32  NOT NULL   (c IS NOT NULL) 45706.1M evals/sec 0.03 cycles/eval
  int32  NULL       (c IS NOT NULL) 48855.0M evals/sec 0.03 cycles/eval

Change-Id: I14fb75c7c330e2415fd7a877186f7ed41a1accce
---
M src/kudu/common/column_predicate-test.cc
M src/kudu/common/column_predicate.cc
2 files changed, 41 insertions(+), 24 deletions(-)



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I14fb75c7c330e2415fd7a877186f7ed41a1accce
Gerrit-Change-Number: 13639
Gerrit-PatchSet: 1
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Andrew Wong <an...@cloudera.com>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>

[kudu-CR] KUDU-2846 (part 2): optimize IS [NOT] NULL predicates

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

Change subject: KUDU-2846 (part 2): optimize IS [NOT] NULL predicates
......................................................................


Patch Set 3: Code-Review+2


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I14fb75c7c330e2415fd7a877186f7ed41a1accce
Gerrit-Change-Number: 13639
Gerrit-PatchSet: 3
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Andrew Wong <an...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Fri, 14 Jun 2019 02:05:48 +0000
Gerrit-HasComments: No

[kudu-CR] KUDU-2846 (part 2): optimize IS [NOT] NULL predicates

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

Change subject: KUDU-2846 (part 2): optimize IS [NOT] NULL predicates
......................................................................


Patch Set 2: Code-Review+2


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I14fb75c7c330e2415fd7a877186f7ed41a1accce
Gerrit-Change-Number: 13639
Gerrit-PatchSet: 2
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Andrew Wong <an...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Thu, 13 Jun 2019 23:43:11 +0000
Gerrit-HasComments: No

[kudu-CR] KUDU-2846 (part 2): optimize IS [NOT] NULL predicates

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

Change subject: KUDU-2846 (part 2): optimize IS [NOT] NULL predicates
......................................................................

KUDU-2846 (part 2): optimize IS [NOT] NULL predicates

This does a simple optimization to use bitwise ops on the selection and
null vectors to implement NOT NULL and NULL, rather than the current
branchy code. The speedup is about 75x.

Before:
  int32  NULL       (c IS NULL) 615.9M evals/sec       4.54 cycles/eval
  int32  NOT NULL   (c IS NOT NULL) 636.3M evals/sec   4.39 cycles/eval
  int32  NULL       (c IS NOT NULL) 645.3M evals/sec   4.33 cycles/eval

After:
  int32  NULL       (c IS NULL) 46811.4M evals/sec     0.03 cycles/eval
  int32  NOT NULL   (c IS NOT NULL) 45706.1M evals/sec 0.03 cycles/eval
  int32  NULL       (c IS NOT NULL) 48855.0M evals/sec 0.03 cycles/eval

Change-Id: I14fb75c7c330e2415fd7a877186f7ed41a1accce
Reviewed-on: http://gerrit.cloudera.org:8080/13639
Tested-by: Kudu Jenkins
Reviewed-by: Andrew Wong <aw...@cloudera.com>
---
M src/kudu/common/column_predicate-test.cc
M src/kudu/common/column_predicate.cc
2 files changed, 42 insertions(+), 24 deletions(-)

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

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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I14fb75c7c330e2415fd7a877186f7ed41a1accce
Gerrit-Change-Number: 13639
Gerrit-PatchSet: 4
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Andrew Wong <an...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>

[kudu-CR] KUDU-2846 (part 2): optimize IS [NOT] NULL predicates

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Hello Will Berkeley, Andrew Wong, Kudu Jenkins, Andrew Wong, 

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

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

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

Change subject: KUDU-2846 (part 2): optimize IS [NOT] NULL predicates
......................................................................

KUDU-2846 (part 2): optimize IS [NOT] NULL predicates

This does a simple optimization to use bitwise ops on the selection and
null vectors to implement NOT NULL and NULL, rather than the current
branchy code. The speedup is about 75x.

Before:
  int32  NULL       (c IS NULL) 615.9M evals/sec       4.54 cycles/eval
  int32  NOT NULL   (c IS NOT NULL) 636.3M evals/sec   4.39 cycles/eval
  int32  NULL       (c IS NOT NULL) 645.3M evals/sec   4.33 cycles/eval

After:
  int32  NULL       (c IS NULL) 46811.4M evals/sec     0.03 cycles/eval
  int32  NOT NULL   (c IS NOT NULL) 45706.1M evals/sec 0.03 cycles/eval
  int32  NULL       (c IS NOT NULL) 48855.0M evals/sec 0.03 cycles/eval

Change-Id: I14fb75c7c330e2415fd7a877186f7ed41a1accce
---
M src/kudu/common/column_predicate-test.cc
M src/kudu/common/column_predicate.cc
2 files changed, 42 insertions(+), 24 deletions(-)


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I14fb75c7c330e2415fd7a877186f7ed41a1accce
Gerrit-Change-Number: 13639
Gerrit-PatchSet: 3
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Andrew Wong <an...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>

[kudu-CR] KUDU-2846 (part 2): optimize IS [NOT] NULL predicates

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

Change subject: KUDU-2846 (part 2): optimize IS [NOT] NULL predicates
......................................................................


Patch Set 1: Code-Review+2


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I14fb75c7c330e2415fd7a877186f7ed41a1accce
Gerrit-Change-Number: 13639
Gerrit-PatchSet: 1
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Andrew Wong <an...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Thu, 13 Jun 2019 21:09:05 +0000
Gerrit-HasComments: No

[kudu-CR] KUDU-2846 (part 2): optimize IS [NOT] NULL predicates

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

Change subject: KUDU-2846 (part 2): optimize IS [NOT] NULL predicates
......................................................................


Patch Set 2:

Rebased this to kick off a new build, since Mike had to restart the Jenkins master.


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I14fb75c7c330e2415fd7a877186f7ed41a1accce
Gerrit-Change-Number: 13639
Gerrit-PatchSet: 2
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Andrew Wong <an...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Thu, 13 Jun 2019 23:44:16 +0000
Gerrit-HasComments: No