findepi commented on code in PR #12104:
URL: https://github.com/apache/datafusion/pull/12104#discussion_r1729479517
##########
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 am not convinced this is a good idea, as it will lead to inconsistent
behavior or statements that should be equivalent. See
https://github.com/apache/datafusion/issues/12103#issuecomment-2307760145
--
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]