You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "Jefffrey (via GitHub)" <gi...@apache.org> on 2023/03/25 05:44:23 UTC

[GitHub] [arrow-datafusion] Jefffrey commented on a diff in pull request #5716: fix: parse table name into TableReference on converting substrait read

Jefffrey commented on code in PR #5716:
URL: https://github.com/apache/arrow-datafusion/pull/5716#discussion_r1148309928


##########
datafusion/substrait/src/logical_plan/producer.rs:
##########
@@ -109,6 +110,17 @@ pub fn to_substrait_rel(
             });
 
             if let Some(struct_items) = projection {
+                let names = match &scan.table_name {
+                    TableReference::Bare { table } => vec![table.to_string()],
+                    TableReference::Partial { schema, table } => {
+                        vec![schema.to_string(), table.to_string()]
+                    }
+                    TableReference::Full {
+                        catalog,
+                        schema,
+                        table,
+                    } => vec![catalog.to_string(), schema.to_string(), table.to_string()],
+                };

Review Comment:
   could move this logic into a function on TableReference itself, since would future proof in case ever want to support nested namespaces in future



-- 
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-unsubscribe@arrow.apache.org

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