Re: [PR] chore: Reduce repetition in the parameter type inference tests [datafusion]
alamb merged PR #16079: URL: https://github.com/apache/datafusion/pull/16079 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org
Re: [PR] chore: Reduce repetition in the parameter type inference tests [datafusion]
jsai28 commented on PR #16079: URL: https://github.com/apache/datafusion/pull/16079#issuecomment-2907011742 @alamb I think this is ready for review. I converted all of the tests in `params.rs` that included an sql statement, expected types, and param values. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org
Re: [PR] chore: Reduce repetition in the parameter type inference tests [datafusion]
alamb commented on code in PR #16079: URL: https://github.com/apache/datafusion/pull/16079#discussion_r2098000742 ## datafusion/sql/tests/sql_integration.rs: ## @@ -55,6 +55,35 @@ use sqlparser::dialect::{Dialect, GenericDialect, HiveDialect, MySqlDialect}; mod cases; mod common; +pub struct ParameterTest<'a> { +pub sql: &'a str, +pub expected_types: Vec<(&'a str, Option)>, +pub param_values: Vec, +} + +#[allow(clippy::needless_lifetimes)] +impl<'a> ParameterTest<'a> { Review Comment: I think you can avoid the clippy issue with something like this: ```suggestion impl ParameterTest<'_> { ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org
Re: [PR] chore: Reduce repetition in the parameter type inference tests [datafusion]
jsai28 commented on PR #16079: URL: https://github.com/apache/datafusion/pull/16079#issuecomment-2891756937 @alamb Yep I just need to fix that clippy issue and then I'll add it to the rest of the tests. I'll probably just do it in this PR itself -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org