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(query): fix values parser in skip_to_next_row #6565

Merged
merged 2 commits into from
Jul 11, 2022

Conversation

sundy-li
Copy link
Member

I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/

Summary

Summary about this PR

Fix values parser in skip_to_next_row, If ' is escaped by \, it will continue to search a valid row.

Fixes #issue

@vercel
Copy link

vercel bot commented Jul 11, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
databend ⬜️ Ignored (Inspect) Jul 11, 2022 at 10:33AM (UTC)

@mergify mergify bot added the pr-bugfix this PR patches a bug in codebase label Jul 11, 2022
@sundy-li sundy-li requested review from youngsofun and b41sh July 11, 2022 07:42
@@ -184,8 +184,15 @@ pub fn skip_to_next_row<R: BufferRead>(
let c = buffer[it];
reader.consume(it + 1);

if it == 0 && escaped {
Copy link
Member

Choose a reason for hiding this comment

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

( and ) can't be escaped.

Copy link
Member Author

Choose a reason for hiding this comment

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

escaped just works for '.

Copy link
Member

Choose a reason for hiding this comment

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

if the buffer is \(, this loop will continue, balance += 1 will not executed.

@b41sh
Copy link
Member

b41sh commented Jul 11, 2022

LGTM

@BohuTANG BohuTANG merged commit d338929 into databendlabs:main Jul 11, 2022
@fkuner
Copy link
Contributor

fkuner commented Jul 12, 2022

value_source_v2 shoud sync with value_source? In this transitional stage, all changes in value_source may be lost in value_source_v2.

How can we guarantee it sync?

cc @sundy-li

@sundy-li
Copy link
Member Author

How can we guarantee it sync?

Oh, I did not notice there is ValueSourceV2, maybe we should keep updating v2 until we remove v1 in the future.

@fkuner
Copy link
Contributor

fkuner commented Jul 12, 2022

Yes, this is awful. Maybe we better remove v1 as soon as possible.

@sundy-li sundy-li added the A-query Area: databend query label Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-query Area: databend query pr-bugfix this PR patches a bug in codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants