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

Unable to create new stream from an existing stream with camel cased field #5032

Closed
tiffanycitra opened this issue Apr 8, 2020 · 2 comments
Assignees
Labels
Milestone

Comments

@tiffanycitra
Copy link

Describe the bug
I created a stream with a camel cased field and am unable to create a new stream from it when I have a WHERE clause involving the camel cased field.

To Reproduce
Version of KSQL is 5.4.0.

// create test topic
kafka-topics --zookeeper localhost:2181 --create --topic test_topic --partitions 4 --replication-factor 1 

// launch ksql-cli
ksql

 // create a stream that consumes from the test topic
ksql> create stream `test-stream` (`camelCasedField` VARCHAR) with (kafka_topic='test_topic', value_format='json');

// create a new stream from the first stream
ksql> create stream `test-stream-2` as select * from `test-stream` where `camelCasedField` = 'foo';
io.confluent.ksql.util.KsqlStatementException: Column 'test-stream.CAMELCASEDFIELD' cannot be resolved.

Expected behavior
test-stream-2 is created successfully.

Actual behaviour
See above.

Additional context
I tried other variations with the back tick and they seem to be interpolated correctly:

ksql> create stream `test-stream-2` as select * from `test-stream` where `camelCased_Field` = 'foo';
Column 'test-stream.camelCased_Field' cannot be resolved.
ksql> create stream `test-stream-2` as select * from `test-stream` where `camelCasedField->blah` = 'foo';
Column 'test-stream.camelCasedField->blah' cannot be resolved.
ksql> create stream `test-stream-2` as select * from `test-stream` where `nonexisting_underscore_field` = 'foo';
Column 'test-stream.nonexisting_underscore_field' cannot be resolved.
@apurvam
Copy link
Contributor

apurvam commented Apr 13, 2020

@agavra was preserving case for field names part of the quoted identifier work you did? If so, did it land in 5.4?

@stevenpyzhang
Copy link
Member

Sorry, I should've closed this out after I cherry-picked the fix into 5.4.

This isn't an issue in master

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

No branches or pull requests

4 participants