[
https://issues.apache.org/jira/browse/BEAM-8592?focusedWorklogId=348654&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-348654
]
ASF GitHub Bot logged work on BEAM-8592:
----------------------------------------
Author: ASF GitHub Bot
Created on: 24/Nov/19 03:29
Start Date: 24/Nov/19 03:29
Worklog Time Spent: 10m
Work Description: kennknowles commented on pull request #10021:
[BEAM-8592] Adjusting ZetaSQL table resolution to standard
URL: https://github.com/apache/beam/pull/10021#discussion_r349900598
##########
File path:
sdks/java/extensions/sql/zetasql/src/main/java/org/apache/beam/sdk/extensions/sql/zetasql/TableResolution.java
##########
@@ -19,43 +19,60 @@
import com.google.zetasql.SimpleTable;
import java.util.List;
-import org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.plan.Context;
+import java.util.stream.Collectors;
+import org.apache.beam.sdk.extensions.sql.impl.BeamCalciteSchema;
+import org.apache.beam.sdk.extensions.sql.impl.TableName;
+import org.apache.beam.sdk.extensions.sql.meta.CustomTableResolver;
+import
org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.jdbc.CalciteSchema;
+import org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.schema.Schema;
import
org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.schema.SchemaPlus;
import org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.schema.Table;
import
org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.Iterables;
/** Utility methods to resolve a table, given a top-level Calcite schema and a
table path. */
public class TableResolution {
- /**
- * Returns Calcite Table by consulting the schema.
- *
- * <p>The way the schema is queried is defined by the name resolution
strategey implemented by a
- * TableResolver and stored as a TableResolutionContext in the context.
- *
- * <p>If no custom table resolution logic is provided, default one is used,
which is: drill down
- * the getSubschema() path until the second-to-last path element. We expect
the path to be a table
- * path, so the last element should be a valid table id, we don't expect
anything else there.
- *
- * <p>This resembles a default Calcite planner strategy. One difference is
that Calcite doesn't
Review comment:
Done.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 348654)
Time Spent: 1h 50m (was: 1h 40m)
> DataCatalogTableProvider should not squash table components together into a
> string
> ----------------------------------------------------------------------------------
>
> Key: BEAM-8592
> URL: https://issues.apache.org/jira/browse/BEAM-8592
> Project: Beam
> Issue Type: Bug
> Components: dsl-sql, dsl-sql-zetasql
> Reporter: Kenneth Knowles
> Assignee: Kenneth Knowles
> Priority: Major
> Time Spent: 1h 50m
> Remaining Estimate: 0h
>
> Currently, if a user writes a table name like \{{foo.`baz.bar`.bizzle}}
> representing the components \{{"foo", "baz.bar", "bizzle"}} the
> DataCatalogTableProvider will concatenate the components into a string and
> resolve the identifier as if it represented \{{"foo", "baz", "bar",
> "bizzle"}}.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)