Skip to content

Conversation

@zhiqiang-hhhh
Copy link
Contributor

Issue Number: close #25900

If conjunc does not act an any slot, do not push it down.

@zhiqiang-hhhh
Copy link
Contributor Author

run buildall

@zhiqiang-hhhh zhiqiang-hhhh changed the title [Bug](predicate) Common expression not acting on any slot should not be pushed down [Fix](predicate pushdown) Common expression not acting on any slot should not be pushed down Oct 25, 2023
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

1 similar comment
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

}
}

std::function<bool(const VExprSPtr&)> _conjunct_is_acting_on_a_slot =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这种的就不要写lambda了,直接定义一个函数吧

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

那这应该定一一个 static bool VExpr::is_acting_on_a_slot() 吧?

for (size_t i = 0; i < children_size; ++i) {
// If any child expr does not act on a column slot
// return false immediately.
if (!_conjunct_is_acting_on_a_slot(children[i])) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这样做应该是不对的,应该是,只要有一个acting on slot,那么就应该是true;其他的是false

// Two conjuncts.
// random() > 1 is executed by scan node, c1 > 0 is pushed down and executed by segment iterator
order_qt_6 """
SELECT * FROM t_pushdown_common_expr WHERE random() > 1 AND c1 > 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

寄一个select * from table where random() > 1 的测试case吧

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 46.05 seconds
stream load tsv: 552 seconds loaded 74807831229 Bytes, about 129 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 65 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 29.0 seconds inserted 10000000 Rows, about 344K ops/s
storage size: 17162033329 Bytes

Copy link
Contributor

@yiguolei yiguolei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Oct 25, 2023
@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@yiguolei
Copy link
Contributor

run buildall

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 47.19 seconds
stream load tsv: 553 seconds loaded 74807831229 Bytes, about 129 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 65 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 29.0 seconds inserted 10000000 Rows, about 344K ops/s
storage size: 17162225743 Bytes

@yiguolei yiguolei added the p0_w label Oct 26, 2023
Copy link
Contributor

@xinyiZzz xinyiZzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yiguolei yiguolei merged commit 6e1a4db into apache:master Oct 26, 2023
dutyu pushed a commit to dutyu/doris that referenced this pull request Oct 28, 2023
xiaokang pushed a commit to xiaokang/doris that referenced this pull request Nov 1, 2023
zhiqiang-hhhh added a commit to zhiqiang-hhhh/doris that referenced this pull request Nov 1, 2023
xiaokang pushed a commit that referenced this pull request Nov 1, 2023
gnehil pushed a commit to gnehil/doris that referenced this pull request Dec 4, 2023
@xiaokang xiaokang mentioned this pull request Dec 4, 2023
XuJianxu pushed a commit to XuJianxu/doris that referenced this pull request Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. dev/2.0.3-merged p0_w pick_pipelinex reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Wrong result when using random() as where condition.

5 participants