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

refactor(binder): refine resolve source schema #10195

Merged
merged 21 commits into from
Jun 19, 2023

Conversation

st1page
Copy link
Contributor

@st1page st1page commented Jun 6, 2023

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

What's changed and what's your intention?

prepare for #10214

Checklist For Contributors

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • I have demonstrated that backward compatibility is not broken by breaking changes and created issues to track deprecated features to be removed in the future. (Please refer to the issue)
  • All checks passed in ./risedev check (or alias, ./risedev c)

Checklist For Reviewers

  • I have requested macro/micro-benchmarks as this PR can affect performance substantially, and the results are shown.

Documentation

  • My PR DOES NOT contain user-facing changes.

Types of user-facing changes

  • SQL commands, functions, and operators

Release note

** breaking changes**

Previously, users can define the primary key when creating a source or table with a connector whose schema is auto-resolved with the external format definition.

CREATE TABLE debezium_non_compact (order_id INT PRIMARY KEY) with (
    connector = 'kafka',
    kafka.topic = 'debezium_non_compact_avro_json',
    kafka.brokers = 'message_queue:29092',
    kafka.scan.startup.mode = 'earliest'
) ROW FORMAT DEBEZIUM_AVRO ROW SCHEMA LOCATION CONFLUENT SCHEMA REGISTRY 'http://message_queue:8081';

But this syntax actually does not make sense. It defines a column and a column constraint on it, which can be expressed as the relation's schema only having this column
Now we will change it to use the table constraint syntax to make it more

CREATE TABLE debezium_non_compact (PRIMARY KEY(order_id)) with ( ...

@st1page st1page marked this pull request as ready for review June 15, 2023 10:32
@BugenZhao BugenZhao changed the title refactor(binder): refline resolve source schema refactor(binder): refine resolve source schema Jun 15, 2023
@BugenZhao BugenZhao self-requested a review June 15, 2023 10:35
@github-actions github-actions bot added the user-facing-changes Contains changes that are visible to users label Jun 15, 2023
@codecov
Copy link

codecov bot commented Jun 19, 2023

Codecov Report

Merging #10195 (a8b43f4) into main (558cef5) will decrease coverage by 0.01%.
The diff coverage is 23.92%.

@@            Coverage Diff             @@
##             main   #10195      +/-   ##
==========================================
- Coverage   70.52%   70.51%   -0.01%     
==========================================
  Files        1255     1255              
  Lines      213963   213947      -16     
==========================================
- Hits       150891   150860      -31     
- Misses      63072    63087      +15     
Flag Coverage Δ
rust 70.51% <23.92%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/frontend/src/handler/create_source.rs 44.70% <21.13%> (+0.35%) ⬆️
src/frontend/src/handler/create_table.rs 90.32% <100.00%> (+0.06%) ⬆️

... and 4 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@st1page st1page added this pull request to the merge queue Jun 19, 2023
Merged via the queue into main with commit 3cea9d2 Jun 19, 2023
@st1page st1page deleted the sts/refactor_bind_resolve_source_schema branch June 19, 2023 08:15
@CharlieSYH CharlieSYH added the 📖✓ Covered or will be covered in the user docs. label Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/refactor user-facing-changes Contains changes that are visible to users 📖✓ Covered or will be covered in the user docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants