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

CTAS: Erroneous "Duplicate values found in schema" #3976

Open
vpapavas opened this issue Nov 25, 2019 · 1 comment
Open

CTAS: Erroneous "Duplicate values found in schema" #3976

vpapavas opened this issue Nov 25, 2019 · 1 comment

Comments

@vpapavas
Copy link
Member

Describe the bug

The assignment of internal column names is not consistent across different queries. The problem might be in the auto-increment when creating a new internal column name.

To Reproduce
Steps to reproduce the behavior, include:

  1. The version of KSQL.
    Master
  2. Sample source data.
    No need for source data
  3. Any SQL statements you ran

First create a table with a value column without any alias. Then, try to create a new table that uses this column again without an alias.

describe metrics_cube;

Name                 : METRICS_CUBE
 Field                 | Type
---------------------------------------------------
 ROWTIME               | BIGINT           (system)
 METRICS_STREAM.ROWKEY | VARCHAR(STRING)
 METRICS_NAME          | VARCHAR(STRING)
 METRICS_VALUE         | DOUBLE
 KSQL_COL_2            | ARRAY<VARCHAR(STRING)>
---------------------------------------------------
For runtime statistics and query details run: DESCRIBE EXTENDED <Stream,Table>;
CREATE TABLE metrics_table AS
SELECT metrics_name, KSQL_COL_2, avg(metrics_value) from metrics_cube WINDOW TUMBLING (size 60 seconds)
GROUP BY metrics_name, KSQL_COL_2;

Gives the error
Duplicate values found in schema: KSQL_COL_2 DOUBLE

Expected behavior
Assign a new internal column name KSQL_COL_3 to the non-aliased column

Actual behaviour
A clear and concise description of what actually happens, including:

  1. CLI output
  2. Error messages
    Duplicate values found in schema: KSQL_COL_2 DOUBLE
  3. KSQL logs

Additional context
Add any other context about the problem here.

@fjbecerra
Copy link
Contributor

Hi @vpapavas
I believe this issue was sorted in #4827 released in KSQL version 0.9.0, reckon it can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants