alamb commented on code in PR #8776:
URL: https://github.com/apache/arrow-datafusion/pull/8776#discussion_r1445091772
##########
datafusion/sqllogictest/test_files/select.slt:
##########
@@ -114,6 +114,14 @@ VALUES (1,2,3,4,5,6,7,8,9,10,11,12,13,NULL,'F',3.5)
----
1 2 3 4 5 6 7 8 9 10 11 12 13 NULL F 3.5
+# Test non-literal expressions in VALUES
Review Comment:
👍
##########
datafusion/physical-plan/src/values.rs:
##########
@@ -53,15 +52,14 @@ impl ValuesExec {
}
let n_row = data.len();
let n_col = schema.fields().len();
- // we have this single row, null, typed batch as a placeholder to
satisfy evaluation argument
- let batch = RecordBatch::try_new(
- schema.clone(),
- schema
- .fields()
- .iter()
- .map(|field| new_null_array(field.data_type(), 1))
- .collect::<Vec<_>>(),
+ // we have this single row batch as a placeholder to satisfy
evaluation argument
Review Comment:
👍 this code to use a null array probably pre-dates the ability to create
zero column record batches
--
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]