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(frontend): CorrelatedInputRef has not been decorrelated in ArraySubquery #14423

Closed
KeXiangWang opened this issue Jan 9, 2024 · 3 comments · Fixed by #14430
Closed

bug(frontend): CorrelatedInputRef has not been decorrelated in ArraySubquery #14423

KeXiangWang opened this issue Jan 9, 2024 · 3 comments · Fixed by #14430
Assignees
Labels
type/bug Something isn't working
Milestone

Comments

@KeXiangWang
Copy link
Contributor

KeXiangWang commented Jan 9, 2024

Describe the bug

No response

Error message/log

Panic: CorrelatedInputRef { index: 0, correlated_id: 0 } has not been decorrelated

To Reproduce

CREATE TABLE IF NOT EXISTS array_types (
    x BIGINT[],
);

SELECT array(
  (
    SELECT t0.x[coalesce(nullif(anon_2 % cardinality(t0.x), 0), cardinality(t0.x))] AS anon_1
    FROM generate_series(1, 1 * cardinality(t0.x)) AS anon_2
  )
  ) AS repeated 
FROM array_types AS t0;

Expected behavior

At least not panic

How did you deploy RisingWave?

Any deployment.

The version of RisingWave

Recentest main.

Additional context

No response

@KeXiangWang KeXiangWang added the type/bug Something isn't working label Jan 9, 2024
@github-actions github-actions bot added this to the release-1.7 milestone Jan 9, 2024
@xxchan xxchan changed the title bug(frontend): CorrelatedInputRef has not been decorrelated bug(frontend): CorrelatedInputRef has not been decorrelated in ArraySubquery Jan 9, 2024
@xxchan
Copy link
Member

xxchan commented Jan 9, 2024

@chenzl25 Can you take a look? Thanks.

@chenzl25
Copy link
Contributor

chenzl25 commented Jan 9, 2024

OK, let me take a look.

@chenzl25 chenzl25 self-assigned this Jan 9, 2024
@chenzl25
Copy link
Contributor

chenzl25 commented Jan 9, 2024

A simplified case:

SELECT array(
    (
      select t0.x
    )
  ) 
FROM array_types AS t0;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants