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

bug: scalar expressions in StreamProjectSet are not evaluated non-strictly #12474

Closed
BugenZhao opened this issue Sep 21, 2023 · 7 comments · Fixed by #17084
Closed

bug: scalar expressions in StreamProjectSet are not evaluated non-strictly #12474

BugenZhao opened this issue Sep 21, 2023 · 7 comments · Fixed by #17084
Assignees
Labels
component/func-expr Support a SQL function or operator component/streaming Stream processing related issue. priority/high type/bug Something isn't working
Milestone

Comments

@BugenZhao
Copy link
Member

BugenZhao commented Sep 21, 2023

Describe the bug

Scalar expressions in StreamProjectSet are not evaluated non-strictly, where failure will lead to recovery. This is inconsistent with the behavior of Project.

Error message/log

failed to execute barrier: Rpc error: gRPC error (Internal error): Actor 72 exit unexpectedly: Executor error: Chunk operation error: Division by zero

To Reproduce

create table t(x int[]);
insert into t values (array[1,2]);

create materialized view mv as select x[1]/0 as bomb, unnest(x) as unnest from t;

Expected behavior

dev=> select * from mv2;
 bomb | unnest 
------+--------
      |      1
      |      2

How did you deploy RisingWave?

No response

The version of RisingWave

No response

Additional context

No response

@BugenZhao BugenZhao added the type/bug Something isn't working label Sep 21, 2023
@github-actions github-actions bot added this to the release-1.3 milestone Sep 21, 2023
@BugenZhao BugenZhao added component/streaming Stream processing related issue. component/func-expr Support a SQL function or operator labels Sep 21, 2023
@xiangjinwu
Copy link
Contributor

And agg #11256 (maybe we can close #11915 and keep these 2 individual issues?)

@BugenZhao
Copy link
Member Author

And agg #11256 (maybe we can close #11915 and keep these 2 individual issues?)

Good catch 🥵

@fuyufjh
Copy link
Member

fuyufjh commented Oct 15, 2023

From my understanding, here we got 2 choices:

  1. Return [], and the whole row will be dropped in ProjectSetExecutor
  2. Return [None], and the row will be kept with a NULL in the column of set-returning function.

(Plus: In either way a warning message need to be reported to user via Cloud Web UI)

I would vote for 2. Option 1 seems to be a bug from users's perspective.

@BugenZhao
Copy link
Member Author

From my understanding, here we got 2 choices:

I suppose you're referring to the opposite part of this issue, i.e., when the set-returning function fails to evaluate. +1 for Option 2.

@BugenZhao
Copy link
Member Author

@wangrunji0408 You now have more expertise in expression error handling than I do. Would you be willing to take over this issue? 🥺

@wangrunji0408
Copy link
Contributor

My pleasure. 🥹

@BugenZhao
Copy link
Member Author

Not only scalar expressions but also the set-returning functions are not evaluated non-strictly as well. We should reopen #11915 to track it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/func-expr Support a SQL function or operator component/streaming Stream processing related issue. priority/high type/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants