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

Schema inference should fail if format in stmt does not match SR format #4636

Closed
big-andy-coates opened this issue Feb 26, 2020 · 1 comment

Comments

@big-andy-coates
Copy link
Contributor

Given an Avro schema in the schema registry, a statement that uses schema inference and a different format should fail, e.g.

{
      "name": "not protobuf schema",
      "statements": [
        "CREATE STREAM INPUT WITH (kafka_topic='input', value_format='PROTOBUF');"
      ],
      "topics": [
        {
          "name": "input",
          "format": "AVRO",
          "schema": {"name": "blah", "type": "record", "fields": [
            {"name": "c1", "type": "int"}
          ]}
        }
      ],
      "expectedException": {
        "type": "io.confluent.ksql.util.KsqlStatementException",
        "message": "something"
      }
    }
@agavra agavra added P0 Denotes must-have for a given milestone pluggable-schemas labels Feb 26, 2020
@agavra agavra added this to the 0.8.0 milestone Feb 26, 2020
@apurvam apurvam added user-experience P0 Denotes must-have for a given milestone and removed P0 Denotes must-have for a given milestone labels Feb 26, 2020
@agavra agavra removed the P0 Denotes must-have for a given milestone label Mar 4, 2020
@agavra
Copy link
Contributor

agavra commented Mar 14, 2020

This currently does fail after #4717 but the error message is not very user friendly. This should fall into the same category as #4647 so I'm closing this as a duplicate.


ksql> CREATE STREAM foo_one (id VARCHAR) WITH (kafka_topic='foo', value_format='PROTOBUF', partitions=1);

 Message
----------------
 Stream created
----------------

ksql> CREATE STREAM bar_two (id VARCHAR) WITH (kafka_topic='foo', value_format='AVRO', partitions=1);
Could not register schema for topic.

@agavra agavra closed this as completed Mar 14, 2020
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

3 participants