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

Throw a better error message when nonexistent column given to INSERT INTO statement #3838

Closed
derekjn opened this issue Nov 13, 2019 · 2 comments · Fixed by #4926
Closed

Throw a better error message when nonexistent column given to INSERT INTO statement #3838

derekjn opened this issue Nov 13, 2019 · 2 comments · Fixed by #4926

Comments

@derekjn
Copy link
Contributor

derekjn commented Nov 13, 2019

For the following stream:

CREATE STREAM test_stream (x VARCHAR, y INTEGER)
  WITH (kafka_topic='test_topic', key='x', value_format='json', partitions=1);

And this INSERT:

INSERT INTO test_stream (x, nonexistent) VALUES ('x', 0);

This error will be thrown:

Failed to insert values into 'TEST_STREAM'. null

We should throw a more descriptive error in this case since we know exactly what the problem is.

@sakshiganeriwal
Copy link

@derekjn @apurvam I was looking into this issue, it looks like the exception message is being passed but the exception object itself is null:
https://github.com/confluentinc/ksql/blob/master/ksql-engine/src/main/java/io/confluent/ksql/engine/InsertValuesExecutor.java#L216
am i looking at the wrong place?

@apurvam
Copy link
Contributor

apurvam commented Dec 7, 2019

It seems like the right place, but the the exception object seems not to have a message set. If the exception object was null, this should have been an NPE. did you try to inspect the exception thrown?

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

Successfully merging a pull request may close this issue.

4 participants