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(parser): parse dollar quoted string #8218

Merged
merged 1 commit into from
Feb 28, 2023

Conversation

wangrunji0408
Copy link
Contributor

@wangrunji0408 wangrunji0408 commented Feb 28, 2023

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

What's changed and what's your intention?

This PR cherry-picks the feature of parsing dollar-quoted string from the upstream sqlparser-rs.
This syntax may be used for inline scripts in other languages, for example:

create function ... language python as $$
def int_42():
    return 42
$$

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.

Signed-off-by: Runji Wang <wangrunji0408@163.com>
@codecov
Copy link

codecov bot commented Feb 28, 2023

Codecov Report

Merging #8218 (72e69b6) into main (42324a9) will increase coverage by 0.00%.
The diff coverage is 91.25%.

@@           Coverage Diff           @@
##             main    #8218   +/-   ##
=======================================
  Coverage   71.59%   71.59%           
=======================================
  Files        1131     1131           
  Lines      182679   182746   +67     
=======================================
+ Hits       130780   130830   +50     
- Misses      51899    51916   +17     
Flag Coverage Δ
rust 71.59% <91.25%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
src/sqlparser/src/ast/mod.rs 87.55% <ø> (ø)
src/sqlparser/src/parser.rs 91.40% <57.14%> (+0.01%) ⬆️
src/sqlparser/src/ast/value.rs 97.53% <87.50%> (-1.10%) ⬇️
src/sqlparser/src/tokenizer.rs 93.89% <95.38%> (+0.03%) ⬆️
src/batch/src/executor/group_top_n.rs 68.23% <0.00%> (-6.48%) ⬇️
src/object_store/src/object/mem.rs 86.48% <0.00%> (-0.78%) ⬇️
src/storage/src/hummock/sstable_store.rs 64.62% <0.00%> (-0.32%) ⬇️
src/storage/src/hummock/compactor/iterator.rs 96.40% <0.00%> (-0.28%) ⬇️
src/object_store/src/object/mod.rs 47.87% <0.00%> (-0.21%) ⬇️
src/common/src/cache.rs 97.15% <0.00%> (-0.11%) ⬇️
... and 5 more

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

@wangrunji0408 wangrunji0408 added this pull request to the merge queue Feb 28, 2023
Merged via the queue into main with commit 9db3773 Feb 28, 2023
@wangrunji0408 wangrunji0408 deleted the wrj/parse-dollar-quoted-string branch February 28, 2023 08:59
@jon-chuang
Copy link
Contributor

Hmm, maybe we can run the python script inside of WASM after all ... https://www.fermyon.com/blog/python-wagi#:~:text=Python%20is%20the%20second%20most,side%20WebAssembly%20app%20in%20Python. 😇

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

Successfully merging this pull request may close these issues.

3 participants