qstommyshu commented on code in PR #16019:
URL: https://github.com/apache/datafusion/pull/16019#discussion_r2085769121


##########
datafusion/sql/src/statement.rs:
##########
@@ -710,6 +710,17 @@ impl<S: ContextProvider> SqlToRel<'_, S> {
                     *statement,
                     &mut planner_context,
                 )?;
+
+                if data_types.is_empty() {
+                    for dt in 
plan.get_parameter_types()?.into_values().into_iter() {
+                        if let Some(dt) = dt {
+                            data_types.push(dt);
+                        }
+                    }
+                    data_types.sort();

Review Comment:
   1. Order by hashmap key
   2. using index map
   3. search for type ids as @alamb suggested 
   
   IMO, the above all sounds like good methods to explore. I feel like simple 
sort might fail on some edge cases (not sure what the sorting is based on).



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to