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

Exception using WITH FILL INTERPOLATE #55794

Closed
bichselb opened this issue Oct 18, 2023 · 3 comments · Fixed by #62185
Closed

Exception using WITH FILL INTERPOLATE #55794

bichselb opened this issue Oct 18, 2023 · 3 comments · Fixed by #62185
Labels
bug Confirmed user-visible misbehaviour in official release st-hold We've paused the work on issue for some reason

Comments

@bichselb
Copy link

Describe what's wrong

When I run the below query, I get an exception:

Query:

CREATE TABLE IF NOT EXISTS example_table (
  ColumnA Int64,
  ColumnB Int64,
  ColumnC Int64
)
ENGINE = MergeTree()
ORDER BY ColumnA;

WITH
helper AS (
  SELECT
    *
  FROM
    example_table
  ORDER BY
    ColumnA WITH FILL INTERPOLATE (
      ColumnB AS ColumnC,
      ColumnC AS ColumnA
    )
)
SELECT ColumnB FROM helper

Reproduce: https://fiddle.clickhouse.com/a739468f-439c-4c8f-9d55-2d2f214fde88

Does it reproduce on recent release?

Yes, I can reproduce this on 23.9.1.1854.

Expected behavior

I would expect the same (empty) output as if I include all columns in the final SELECT:

DROP TABLE IF EXISTS example_table;

CREATE TABLE IF NOT EXISTS example_table (
  ColumnA Int64,
  ColumnB Int64,
  ColumnC Int64
)
ENGINE = MergeTree()
ORDER BY ColumnA;

WITH
helper AS (
  SELECT
    *
  FROM
    example_table
  ORDER BY
    ColumnA WITH FILL INTERPOLATE (
      ColumnB AS ColumnC,
      ColumnC AS ColumnA
    )
)
SELECT * FROM helper

Error message and/or stacktrace

I get the following exception:

Received exception from server (version 23.9.1):
Code: 47. DB::Exception: Received from localhost:9000. DB::Exception: Unknown column: ColumnA, there are only columns ColumnB, ColumnC. (UNKNOWN_IDENTIFIER)
(query: WITH
helper AS (
  SELECT
    *
  FROM
    example_table
  ORDER BY
    ColumnA WITH FILL INTERPOLATE (
      ColumnB AS ColumnC,
      ColumnC AS ColumnA
    )
)
SELECT ColumnB FROM helper)

@bichselb bichselb added the potential bug To be reviewed by developers and confirmed/rejected. label Oct 18, 2023
@melvynator
Copy link
Member

Seems like this is a regression. It works in the previous version: https://fiddle.clickhouse.com/e7ce768d-c011-48a3-a186-c05220127b4c

@melvynator melvynator added bug Confirmed user-visible misbehaviour in official release and removed potential bug To be reviewed by developers and confirmed/rejected. labels Oct 23, 2023
@devcrafter
Copy link
Member

But works with enabled allow_experimental_analyzer https://fiddle.clickhouse.com/33e32ea4-133a-4167-b7ef-f89df25cb077

@alexey-milovidov alexey-milovidov added the st-hold We've paused the work on issue for some reason label Feb 19, 2024
@nikitamikhaylov
Copy link
Member

#23194

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed user-visible misbehaviour in official release st-hold We've paused the work on issue for some reason
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants