Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[opt](agg function) Signature verification of aggregate function. #40682

Merged
merged 5 commits into from
Nov 4, 2024

Conversation

zhiqiang-hhhh
Copy link
Contributor

@zhiqiang-hhhh zhiqiang-hhhh commented Sep 11, 2024

Prevent be from crash when Nullable property of aggregate function is changed on FE.

Rule:

  • With group by key:

Result type of Aggregate function must be exactly same with type from planner.

  • Without group by key:

If planner gives BE a nullable type, but aggregate function returns a not null type, it is valid.
Else, a type mismatch is satisfied, BE will report an exception.

Note, for xxx_foreach, type check is disabled for now.

@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@zhiqiang-hhhh
Copy link
Contributor Author

run buildall

1 similar comment
@zhiqiang-hhhh
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.87% (9461/25657)
Line Coverage: 28.25% (77802/275432)
Region Coverage: 27.65% (40179/145295)
Branch Coverage: 24.26% (20413/84142)
Coverage Report: http://coverage.selectdb-in.cc/coverage/1147d1ce0f60c31d2c4a5018e158fcb9fca0586d_1147d1ce0f60c31d2c4a5018e158fcb9fca0586d/report/index.html

@zhiqiang-hhhh zhiqiang-hhhh force-pushed the opt-agg-func-signature branch 2 times, most recently from 759c15b to 5150e4f Compare September 23, 2024 03:09
@zhiqiang-hhhh
Copy link
Contributor Author

run buildall

@zhiqiang-hhhh
Copy link
Contributor Author

run buildall

1 similar comment
@zhiqiang-hhhh
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 37.28% (9627/25825)
Line Coverage: 28.68% (79690/277904)
Region Coverage: 28.11% (41211/146606)
Branch Coverage: 24.73% (20985/84868)
Coverage Report: http://coverage.selectdb-in.cc/coverage/e12dd883854d78ee4c8f13702d82a696ad9276f7_e12dd883854d78ee4c8f13702d82a696ad9276f7/report/index.html

@zhiqiang-hhhh
Copy link
Contributor Author

run buildall

4 similar comments
@zhiqiang-hhhh
Copy link
Contributor Author

run buildall

@zhiqiang-hhhh
Copy link
Contributor Author

run buildall

@zhiqiang-hhhh
Copy link
Contributor Author

run buildall

@zhiqiang-hhhh
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 37.27% (9627/25827)
Line Coverage: 28.67% (79682/277952)
Region Coverage: 28.10% (41206/146629)
Branch Coverage: 24.72% (20984/84872)
Coverage Report: http://coverage.selectdb-in.cc/coverage/4a87a745bb86a6fe770ce1bbaad9cd8134a7c3df_4a87a745bb86a6fe770ce1bbaad9cd8134a7c3df/report/index.html

@zhiqiang-hhhh
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 37.27% (9627/25827)
Line Coverage: 28.68% (79712/277952)
Region Coverage: 28.10% (41208/146629)
Branch Coverage: 24.73% (20989/84872)
Coverage Report: http://coverage.selectdb-in.cc/coverage/a237d80f1568371260a79cba7c5ca8c3095b35cd_a237d80f1568371260a79cba7c5ca8c3095b35cd/report/index.html

@zhiqiang-hhhh
Copy link
Contributor Author

run buildall

@zhiqiang-hhhh
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 37.32% (9631/25806)
Line Coverage: 28.70% (79884/278305)
Region Coverage: 28.13% (41290/146764)
Branch Coverage: 24.75% (21034/84982)
Coverage Report: http://coverage.selectdb-in.cc/coverage/cc6e878fc7652a882380cc4f84174b374eea41ac_cc6e878fc7652a882380cc4f84174b374eea41ac/report/index.html

@zhiqiang-hhhh zhiqiang-hhhh force-pushed the opt-agg-func-signature branch from cc6e878 to b7a9cd5 Compare October 14, 2024 15:36
@zhiqiang-hhhh
Copy link
Contributor Author

run buildall

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 37.46% (9709/25917)
Line Coverage: 28.74% (80625/280509)
Region Coverage: 28.18% (41701/147976)
Branch Coverage: 24.76% (21207/85640)
Coverage Report: http://coverage.selectdb-in.cc/coverage/b7a9cd57eb74188ecca95b86c9af2d0d107569a3_b7a9cd57eb74188ecca95b86c9af2d0d107569a3/report/index.html

@zhiqiang-hhhh
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 37.46% (9709/25920)
Line Coverage: 28.72% (80597/280643)
Region Coverage: 28.17% (41715/148104)
Branch Coverage: 24.74% (21205/85706)
Coverage Report: http://coverage.selectdb-in.cc/coverage/fa5e12446865227ebdd567b00e96ffddd4081ac1_fa5e12446865227ebdd567b00e96ffddd4081ac1/report/index.html

@zhiqiang-hhhh
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 37.82% (9821/25969)
Line Coverage: 29.00% (81628/281524)
Region Coverage: 28.26% (42145/149112)
Branch Coverage: 24.85% (21389/86074)
Coverage Report: http://coverage.selectdb-in.cc/coverage/a4bd446aae1acae8186ae3e4d36812b9fbec1659_a4bd446aae1acae8186ae3e4d36812b9fbec1659/report/index.html

@zhiqiang-hhhh zhiqiang-hhhh marked this pull request as ready for review November 1, 2024 07:42
@zhiqiang-hhhh zhiqiang-hhhh changed the title [draft](opt)(agg function) Signature verification of aggregate function. (opt)(agg function) Signature verification of aggregate function. Nov 1, 2024
@zhiqiang-hhhh zhiqiang-hhhh changed the title (opt)(agg function) Signature verification of aggregate function. [opt](agg function) Signature verification of aggregate function. Nov 1, 2024
Copy link
Contributor

@HappenLee HappenLee 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 Nov 4, 2024
Copy link
Contributor

github-actions bot commented Nov 4, 2024

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

Copy link
Contributor

github-actions bot commented Nov 4, 2024

PR approved by anyone and no changes requested.

@yiguolei yiguolei merged commit 865028f into apache:master Nov 4, 2024
27 of 30 checks passed
github-actions bot pushed a commit that referenced this pull request Nov 4, 2024
…0682)

Prevent be from crash when Nullable property of aggregate function is
changed on FE.

Rule:

* With group by key:

Result type of Aggregate function must be exactly same with type from
planner.

* Without group by key:

If planner gives BE a nullable type, but aggregate function returns a
not null type, it is valid.
Else, a type mismatch is satisfied, BE will report an exception.

Note, for `xxx_foreach`, type check is disabled for now.
github-actions bot pushed a commit that referenced this pull request Nov 4, 2024
…0682)

Prevent be from crash when Nullable property of aggregate function is
changed on FE.

Rule:

* With group by key:

Result type of Aggregate function must be exactly same with type from
planner.

* Without group by key:

If planner gives BE a nullable type, but aggregate function returns a
not null type, it is valid.
Else, a type mismatch is satisfied, BE will report an exception.

Note, for `xxx_foreach`, type check is disabled for now.
@zhiqiang-hhhh zhiqiang-hhhh deleted the opt-agg-func-signature branch November 8, 2024 12:39
yiguolei pushed a commit that referenced this pull request Nov 9, 2024
…unction. (#43191)

Cherry-picked from #40682

Co-authored-by: zhiqiang <seuhezhiqiang@163.com>
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.1.x dev/3.0.3-merged reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants