Blizzara commented on code in PR #11547:
URL: https://github.com/apache/datafusion/pull/11547#discussion_r1688326679


##########
datafusion/substrait/src/logical_plan/consumer.rs:
##########
@@ -1785,6 +1798,98 @@ fn from_substrait_literal(
                 }
             }
         }
+        Some(LiteralType::Map(m)) => {
+            // Each entry should start the name index from the same value, 
then we increase it
+            // once at the end
+            let mut entry_name_idx = *name_idx;
+            let entries = m
+                .key_values
+                .iter()
+                .map(|kv| {
+                    entry_name_idx = *name_idx;
+                    let key_sv = from_substrait_literal(
+                        kv.key.as_ref().unwrap(),
+                        extensions,
+                        dfs_names,
+                        &mut entry_name_idx,
+                    )?;
+                    let value_sv = from_substrait_literal(
+                        kv.value.as_ref().unwrap(),
+                        extensions,
+                        dfs_names,
+                        &mut entry_name_idx,
+                    )?;
+                    ScalarStructBuilder::new()

Review Comment:
   Hmh, yeah I think I'll leave it as-is for now, as this code is relevant only 
for local relations (ie data encoded in the substrait message itself) I don't 
expect it to be very performance-sensitive, the data scale should hopefully 
always be small...



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