[ 
https://issues.apache.org/jira/browse/BEAM-4388?focusedWorklogId=111053&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-111053
 ]

ASF GitHub Bot logged work on BEAM-4388:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 12/Jun/18 13:26
            Start Date: 12/Jun/18 13:26
    Worklog Time Spent: 10m 
      Work Description: kennknowles commented on a change in pull request 
#5481: [BEAM-4388] Support optimized logical plan
URL: https://github.com/apache/beam/pull/5481#discussion_r194735787
 
 

 ##########
 File path: 
sdks/java/extensions/sql/src/test/java/org/apache/beam/sdk/extensions/sql/BeamSqlExplainTest.java
 ##########
 @@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.beam.sdk.extensions.sql;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.beam.sdk.extensions.sql.impl.parser.impl.BeamSqlParserImpl;
+import org.apache.beam.sdk.extensions.sql.meta.provider.text.TextTableProvider;
+import org.apache.beam.sdk.extensions.sql.meta.store.InMemoryMetaStore;
+import org.apache.calcite.sql.parser.SqlParseException;
+import org.apache.calcite.tools.RelConversionException;
+import org.apache.calcite.tools.ValidationException;
+import org.junit.Before;
+import org.junit.Test;
+
+/** UnitTest for {@link BeamSqlParserImpl}. */
+public class BeamSqlExplainTest {
+  private InMemoryMetaStore metaStore;
+  private BeamSqlCli cli;
+
+  @Before
+  public void setUp() throws SqlParseException, RelConversionException, 
ValidationException {
+    metaStore = new InMemoryMetaStore();
+    metaStore.registerProvider(new TextTableProvider());
+    cli = new BeamSqlCli().metaStore(metaStore);
+
+    cli.execute(
+        "create table person (\n"
+            + "id int COMMENT 'id', \n"
+            + "name varchar COMMENT 'name', \n"
+            + "age int COMMENT 'age') \n"
+            + "TYPE 'text' \n"
+            + "COMMENT '' ");
+
+    cli.execute(
+        "create table A (\n"
+            + "c1 int COMMENT 'c1',\n"
+            + "c2 int COMMENT 'c2')\n"
+            + "TYPE 'text'\n"
+            + "COMMENT '' ");
+
+    cli.execute(
+        "create table B (\n"
+            + "c1 int COMMENT 'c1',\n"
+            + "c2 int COMMENT 'c2')\n"
+            + "TYPE 'text'\n"
+            + "COMMENT '' ");
+  }
+
+  @Test
+  public void testExplainCommaJoin() {
 
 Review comment:
   This is too specific for a test. Changes that are totally OK can break it 
easily. I think you just want to make sure this query can actually run, not 
crash, right?
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 111053)
    Time Spent: 4h 40m  (was: 4.5h)

> Support optimized logical plan
> ------------------------------
>
>                 Key: BEAM-4388
>                 URL: https://issues.apache.org/jira/browse/BEAM-4388
>             Project: Beam
>          Issue Type: Sub-task
>          Components: dsl-sql
>            Reporter: Kai Jiang
>            Assignee: Kai Jiang
>            Priority: Major
>          Time Spent: 4h 40m
>  Remaining Estimate: 0h
>
> Before converting into Beam Pipeline physical plan, logical plan should be 
> optimized and it will be super helpful for efficiently executing Beam 
> PTransforms pipeline. 
> Calcite has two ways for optimizing logical plan (HepPlanner and 
> VolcanoPlanner). We can support VolcanoPlanner first and apply calcite 
> builtin optimize rules (like 
> FilterJoinRule.FILTER_ON_JOIN) to sql query optimize plans.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to