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: remove base::sqlparser::ident since into() is simpler #437

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

iajoiner
Copy link
Contributor

@iajoiner iajoiner commented Dec 16, 2024

Please be sure to look over the pull request guidelines here: https://github.com/spaceandtimelabs/sxt-proof-of-sql/blob/main/CONTRIBUTING.md#submit-pr.

Please go through the following checklist

Rationale for this change

This change simplifies the codebase since proof_of_sql::base::sqlparser::ident only does one thing which is to call From<&str> on Ident. Let's simplify the codebase here.

What changes are included in this PR?

See title.

Are these changes tested?

Yes.

@iajoiner iajoiner requested a review from Dustin-Ray December 16, 2024 21:04
@iajoiner iajoiner force-pushed the refactor/rem-helper branch 2 times, most recently from 4d1b9cf to b72b6c6 Compare December 16, 2024 21:06
Comment on lines +35 to +36
"boolean_column".into(),
ColumnRef::new(tab_ref, "boolean_column".into(), ColumnType::Boolean),
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these always strings? Why not simplify this and abstract the into() conversions away so that the K,V pair becomes String, ColumnRef or &str, ColumnRef, same comment with the ColumnRef new field

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Dustin-Ray These are sqlparser::ast::Idents. That's the easiest way to construct an Ident from a string.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Dustin-Ray We used to use Identifier and now use Ident. Strings don't really one-on-one map to Ident.

@iajoiner iajoiner requested a review from Dustin-Ray December 16, 2024 21:12
@iajoiner iajoiner force-pushed the refactor/rem-helper branch from b72b6c6 to ce4274d Compare December 16, 2024 21:18
Copy link
Contributor

@Dustin-Ray Dustin-Ray left a comment

Choose a reason for hiding this comment

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

LGTM

@iajoiner iajoiner enabled auto-merge December 16, 2024 21:41
@iajoiner iajoiner merged commit 447f312 into main Dec 16, 2024
13 checks passed
@iajoiner iajoiner deleted the refactor/rem-helper branch December 16, 2024 21:47
Copy link

🎉 This PR is included in version 0.63.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

3 participants