[
https://issues.apache.org/jira/browse/BEAM-7513?focusedWorklogId=263272&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-263272
]
ASF GitHub Bot logged work on BEAM-7513:
----------------------------------------
Author: ASF GitHub Bot
Created on: 19/Jun/19 20:13
Start Date: 19/Jun/19 20:13
Worklog Time Spent: 10m
Work Description: riazela commented on pull request #8892: [BEAM-7513]
Bigquery rowcount
URL: https://github.com/apache/beam/pull/8892#discussion_r295503427
##########
File path:
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/BeamCalciteTable.java
##########
@@ -38,32 +41,70 @@
import org.apache.calcite.rex.RexNode;
import org.apache.calcite.schema.ModifiableTable;
import org.apache.calcite.schema.SchemaPlus;
+import org.apache.calcite.schema.Statistic;
+import org.apache.calcite.schema.Statistics;
import org.apache.calcite.schema.TranslatableTable;
/** Adapter from {@link BeamSqlTable} to a calcite Table. */
public class BeamCalciteTable extends AbstractQueryableTable
implements ModifiableTable, TranslatableTable {
private final BeamSqlTable beamTable;
- private final Map<String, String> pipelineOptions;
+ private final Map<String, String> pipelineOptionsMap;
+ private PipelineOptions pipelineOptions;
- BeamCalciteTable(BeamSqlTable beamTable, Map<String, String>
pipelineOptions) {
+ // BeamCalciteTable(BeamSqlTable beamTable, Map<String, String>
pipelineOptionsMap) {
+ // this(beamTable,pipelineOptionsMap,null);
+ // }
+
+ BeamCalciteTable(
+ BeamSqlTable beamTable,
+ Map<String, String> pipelineOptionsMap,
+ PipelineOptions pipelineOptions) {
super(Object[].class);
this.beamTable = beamTable;
+ this.pipelineOptionsMap = pipelineOptionsMap;
this.pipelineOptions = pipelineOptions;
}
public static BeamCalciteTable of(BeamSqlTable table) {
- return new BeamCalciteTable(table, ImmutableMap.of());
+ return new BeamCalciteTable(table, ImmutableMap.of(), null);
}
@Override
public RelDataType getRowType(RelDataTypeFactory typeFactory) {
return CalciteUtils.toCalciteRowType(this.beamTable.getSchema(),
typeFactory);
}
+ private PipelineOptions getPipelineOptions() {
Review comment:
No. The pipelineoptions object was not passed to BeamCalciteTable. So the
process in JDBC Driver that was converting pipeline options to map is also
deleted. So JDBC Connection and JDBC Driver are also changed.
----------------------------------------------------------------
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: 263272)
Time Spent: 8.5h (was: 8h 20m)
> Row Estimation for BigQueryTable
> --------------------------------
>
> Key: BEAM-7513
> URL: https://issues.apache.org/jira/browse/BEAM-7513
> Project: Beam
> Issue Type: New Feature
> Components: dsl-sql, io-java-gcp
> Reporter: Alireza Samadianzakaria
> Assignee: Alireza Samadianzakaria
> Priority: Major
> Time Spent: 8.5h
> Remaining Estimate: 0h
>
> Calcite tables (org.apache.calcite.schema.Table) should implement the method
> org.apache.calcite.schema.Statistic getStatistic(). The Statistic instance
> returned by this method is used for the Volcano optimizer in Calcite.
> Currently, org.apache.beam.sdk.extensions.sql.impl.BeamCalciteTable has not
> implemented getStatistic() which means it uses the implementation in
> org.apache.calcite.schema.impl.AbstractTable and that implementation just
> returns Statistics.UNKNOWN for all sources.
>
> Things needed to be implemented:
> 1- Implementing getStatistic in BeamCalciteTable such that it calls a row
> count estimation method from BeamSqlTable and adding this method to
> BeamSqlTable.
> 2- Implementing the row count estimation method for BigQueryTable.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)