alamb commented on code in PR #12104:
URL: https://github.com/apache/datafusion/pull/12104#discussion_r1732879294


##########
datafusion/sql/src/values.rs:
##########
@@ -41,6 +41,11 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
                     .collect::<Result<Vec<_>>>()
             })
             .collect::<Result<Vec<_>>>()?;
-        LogicalPlanBuilder::values(values)?.build()
+        let column_types = planner_context.values_column_data_types();
+        if column_types.is_empty() {
+            LogicalPlanBuilder::values(values)?.build()
+        } else {
+            LogicalPlanBuilder::values_with_types(values, 
column_types)?.build()

Review Comment:
   I agree with @findepi  -- 
https://github.com/apache/datafusion/issues/12103#issuecomment-2312601583 
   
   Thank you @davisp  for this PR -- let us know what you think about the 
alternate proposal



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to