Skip to content

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

}
}

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

[
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