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

Replace double quotes to identifier #1001

Merged
merged 8 commits into from
Nov 12, 2022

Conversation

devgony
Copy link
Collaborator

@devgony devgony commented Nov 12, 2022

Goal

Currently, Both double quotes and single quotes evaluated as literal string.
From now, Double quotes will be evaluated as identifier.

Before

gluesql> SELECT "name";
"name"
name

After

gluesql> select "name";
[error] value not found: name

Todo

  • handle double quotes as identifier at translate/expr
  • fix all test cases

@devgony devgony added the improvement Improvements for existing features label Nov 12, 2022
@devgony devgony self-assigned this Nov 12, 2022
@devgony devgony marked this pull request as ready for review November 12, 2022 12:28
@@ -287,7 +287,10 @@ impl Interval {
format!("{:?}", to),
)
.into()),
(None, _) => Err(IntervalError::Unreachable.into()),
(None, _) => {
println!("here");
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
println!("here");

Comment on lines 18 to 19
println!("{parsed:?}");
// println!("{leading_field:?}:{last_field:?}");
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
println!("{parsed:?}");
// println!("{leading_field:?}:{last_field:?}");

@coveralls
Copy link

coveralls commented Nov 12, 2022

Pull Request Test Coverage Report for Build 3451045591

  • 790 of 790 (100.0%) changed or added relevant lines in 71 files are covered.
  • 19 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.04%) to 98.386%

Files with Coverage Reduction New Missed Lines %
test-suite/src/tester/mod.rs 19 87.5%
Totals Coverage Status
Change from base Build 3450937156: -0.04%
Covered Lines: 39873
Relevant Lines: 40527

💛 - Coveralls

Copy link
Member

@ever0de ever0de left a comment

Choose a reason for hiding this comment

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

🥳 🥳 🥳

Copy link
Member

@panarch panarch left a comment

Choose a reason for hiding this comment

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

Awesome...! 👍 👍 👍
I wasn't aware of that double quotes means identifier in SQL.
Looks all great, thanks a lot!

@panarch panarch merged commit fa060b3 into gluesql:main Nov 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvements for existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants