jayzhan211 commented on PR #8269: URL: https://github.com/apache/arrow-datafusion/pull/8269#issuecomment-1818963564
> I think we need to fix here. > > https://github.com/apache/arrow-datafusion/blob/393e48f98872c696a90fce033fa584533d2326fa/datafusion/sql/src/expr/value.rs#L156-L158 > > ```rust > if data_types.is_empty() { > // ListArray[NullArray(0)], the same as `make_array()`. > let array = new_null_array(&DataType::Null, 0); > let array = Arc::new(array_into_list_array(array)); > Ok(lit(ScalarValue::List(array))) > } else if data_types.len() > 1 { > ``` Update: I found we can easily reuse MakeArray for sql_array_literal ```rust Ok(Expr::ScalarFunction(ScalarFunction::new( BuiltinScalarFunction::MakeArray, 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
