yyy1000 commented on code in PR #9759:
URL: https://github.com/apache/arrow-datafusion/pull/9759#discussion_r1536699964
##########
datafusion/sql/src/unparser/expr.rs:
##########
@@ -561,6 +636,31 @@ mod tests {
}),
r#"CAST("a" AS INTEGER UNSIGNED)"#,
),
+ (
+ Expr::InList(InList {
+ expr: Box::new(col("a")),
+ list: vec![lit(1), lit(2), lit(3)],
+ negated: false,
+ }),
+ r#""a" IN (1, 2, 3)"#,
+ ),
+ (
+ Expr::InList(InList {
+ expr: Box::new(col("a")),
+ list: vec![lit(1), lit(2), lit(3)],
+ negated: true,
+ }),
+ r#""a" NOT IN (1, 2, 3)"#,
+ ),
+ (
+ Expr::ScalarFunction(ScalarFunction {
+ func_def: ScalarFunctionDefinition::UDF(Arc::new(
+ ScalarUDF::new_from_impl(DummyUDF::new()),
+ )),
+ args: vec![col("a"), col("b")],
+ }),
+ r#"dummy_udf("a", "b")"#,
+ ),
Review Comment:
I think for `ScalarFunction`, it's better to add test cases for `UDF` and
`BuiltIn`.
But since the function port work is going to be finished, I doubt whether
it's necessary to do that. :)
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]