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

fix(source): cleanup unused key schema logic & requirements for format upsert encode avro #17759

Merged
merged 4 commits into from
Jul 22, 2024

Conversation

xiangjinwu
Copy link
Contributor

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

Resolves #17670

  • The boolean AvroProperties::enable_upsert is not useful
  • The option AvroParserConfig::key_schema is always None (after boolean removal above)
  • The enum encoding_type is always hardcoded as EncodingType::Value except for DebeziumAvro.
  • Removes non-existent Debezium + Protobuf.

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added test labels as necessary. See details.
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
  • All checks passed in ./risedev check (or alias, ./risedev c)
  • My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)
  • My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

  • My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note

If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.

@github-actions github-actions bot added the type/fix Bug fix label Jul 19, 2024
@xiangjinwu xiangjinwu requested review from tabVersion and xxchan July 22, 2024 08:35
Copy link
Contributor

@tabVersion tabVersion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please also clean up the doc

Comment on lines -87 to -96
statement error SCHEMA_REGISTRY_NAME_STRATEGY_TOPIC_RECORD_NAME_STRATEGY expect non-empty field key\.message
create table t_topic_record () with (
connector = 'kafka',
topic = 'upsert_avro_json-topic-record',
properties.bootstrap.server = '${RISEDEV_KAFKA_BOOTSTRAP_SERVERS}'
) format upsert encode avro (
schema.registry = '${RISEDEV_SCHEMA_REGISTRY_URL}',
schema.registry.name.strategy = 'topic_record_name_strategy',
message = 'CPLM.OBJ_ATTRIBUTE_VALUE'
);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it makes sense removing name strategy related things since we does not interpret key schema.

Copy link
Member

@xxchan xxchan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wonderful

@xxchan
Copy link
Member

xxchan commented Jul 22, 2024

The enum encoding_type is always hardcoded as EncodingType::Value except for DebeziumAvro.

Hmmm, for format debezium encode avro, is the key schema useful? Can we also eliminate that?

@xiangjinwu
Copy link
Contributor Author

The enum encoding_type is always hardcoded as EncodingType::Value except for DebeziumAvro.

Hmmm, for format debezium encode avro, is the key schema useful? Can we also eliminate that?

I have not followed the whole debezium path yet, so I cannot tell whether those lines are useful or not.

@xiangjinwu xiangjinwu added this pull request to the merge queue Jul 22, 2024
Merged via the queue into main with commit 61b1286 Jul 22, 2024
29 of 30 checks passed
@xiangjinwu xiangjinwu deleted the fix-source-upsert-key-encode branch July 22, 2024 09:35
@xiangjinwu xiangjinwu added the user-facing-changes Contains changes that are visible to users label Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/fix Bug fix user-facing-changes Contains changes that are visible to users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix(source): format upsert encode avro shall no longer fetch key schema from registry
3 participants