Skip to content

Add value spans to clickbench tests, add docs and From impl #1

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

Closed
wants to merge 5 commits into from

Conversation

alamb
Copy link

@alamb alamb commented Feb 24, 2025

Merging this PR will update the above PR

I will comment inline

#[derive(Debug, Clone, Eq, Ord)]
/// Wraps a primitive SQL [`Value`] with its [`Span`] location
///
/// # Example: create a `ValueWithSpan` from a `Value`
Copy link
Author

Choose a reason for hiding this comment

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

I added some examples to make the transition easier

}
}

impl Ord for ValueWithSpan {
Copy link
Author

Choose a reason for hiding this comment

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

I did this to fix clippy

@@ -63,6 +102,12 @@ impl From<ValueWithSpan> for Value {
}
}

impl From<Value> for ValueWithSpan {
Copy link
Author

Choose a reason for hiding this comment

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

This makes it easy to create new ValueWithSpan

@@ -55,7 +55,7 @@ fn parse_map_access_expr() {
"indexOf",
[
Expr::Identifier(Ident::new("string_names")),
Expr::Value(Value::SingleQuotedString("endpoint".to_string()))
Expr::value(Value::SingleQuotedString("endpoint".to_string()))
Copy link
Author

Choose a reason for hiding this comment

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

By adding the Expr::value method, the changes to update the tests became a find/replace exercise

@alamb alamb changed the title Add value spans to clickbench tests, add docs and FromImpl Add value spans to clickbench tests, add docs and From impl Feb 24, 2025
@lovasoa
Copy link
Owner

lovasoa commented Feb 24, 2025

Thanks for your help ! I manually merged your changes into apache#1738

@lovasoa lovasoa closed this Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants