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

feat: except after qualified wildcard #10723

Merged
merged 8 commits into from
Jul 20, 2023
Merged

feat: except after qualified wildcard #10723

merged 8 commits into from
Jul 20, 2023

Conversation

wugouzi
Copy link
Contributor

@wugouzi wugouzi commented Jul 4, 2023

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

What's changed and what's your intention?

Add support for except after qualified wildcard. Example:

select t.* except (t.v1) from t;

Also move the select except related test to single file.

There is one more question: do we need to support except with ambiguous columns? The related results varies from implementations. Consider

create table t (v1 int, v2 int);
insert into t values (1,2);
select * except (v1) from t t1, t t2;

duckdb outputs

┌───────┬───────┐
│  v2   │  v2   │
│ int32 │ int32 │
├───────┼───────┤
│     2 │     2 │
└───────┴───────┘

and clickhouse outputs

┌─v2─┬─t2.v1─┬─t2.v2─┐
│  2 │     1 │     2 │
└────┴───────┴───────┘

Close: #10711

Checklist

  • 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).
  • 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 contains user-facing changes.
Click here for Documentation

Types of user-facing changes

Please keep the types that apply to your changes, and remove the others.

  • Installation and deployment
  • Connector (sources & sinks)
  • SQL commands, functions, and operators
  • RisingWave cluster configuration changes
  • Other (please specify in the release note below)

Release note

@wugouzi wugouzi requested review from st1page and xxchan July 4, 2023 02:53
@github-actions github-actions bot added type/feature user-facing-changes Contains changes that are visible to users labels Jul 4, 2023
@codecov
Copy link

codecov bot commented Jul 4, 2023

Codecov Report

Merging #10723 (6992b14) into main (7ad0a40) will decrease coverage by 0.01%.
The diff coverage is 72.03%.

@@            Coverage Diff             @@
##             main   #10723      +/-   ##
==========================================
- Coverage   69.94%   69.94%   -0.01%     
==========================================
  Files        1312     1312              
  Lines      224605   224668      +63     
==========================================
+ Hits       157090   157133      +43     
- Misses      67515    67535      +20     
Flag Coverage Δ
rust 69.94% <72.03%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
src/meta/src/manager/catalog/utils.rs 49.30% <0.00%> (-0.18%) ⬇️
src/sqlparser/src/ast/mod.rs 84.80% <20.00%> (-0.72%) ⬇️
src/frontend/src/binder/expr/function.rs 86.71% <33.33%> (ø)
src/sqlparser/src/parser.rs 86.27% <81.48%> (-0.11%) ⬇️
src/frontend/src/binder/select.rs 65.42% <84.00%> (+0.28%) ⬆️
src/frontend/src/handler/create_sink.rs 95.83% <100.00%> (ø)
src/sqlparser/src/ast/query.rs 88.01% <100.00%> (+0.42%) ⬆️

... and 6 files with indirect coverage changes

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

@CharlieSYH CharlieSYH added the 📖✓ Covered or will be covered in the user docs. label Jul 18, 2023
Copy link
Member

@fuyufjh fuyufjh left a comment

Choose a reason for hiding this comment

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

LGTM. @st1page Please take another look

@fuyufjh fuyufjh requested a review from xiangjinwu July 19, 2023 09:16
Copy link
Contributor

@st1page st1page left a comment

Choose a reason for hiding this comment

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

LGTM

@wugouzi wugouzi added this pull request to the merge queue Jul 20, 2023
Merged via the queue into main with commit 64fcee2 Jul 20, 2023
@wugouzi wugouzi deleted the qiao/bytes2 branch July 20, 2023 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature 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.

more edge cases for select * except
4 participants