drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-4465) Refactor Parsing and Planning to canonicalize planning and parsing
Date Thu, 03 Mar 2016 06:35:18 GMT

    [ https://issues.apache.org/jira/browse/DRILL-4465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15177332#comment-15177332
] 

ASF GitHub Bot commented on DRILL-4465:
---------------------------------------

Github user jacques-n commented on a diff in the pull request:

    https://github.com/apache/drill/pull/401#discussion_r54840997
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/DrillSqlParser.java
---
    @@ -0,0 +1,349 @@
    +/**
    + * 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.drill.exec.planner.sql;
    +
    +import java.util.Arrays;
    +import java.util.List;
    +
    +import org.apache.calcite.adapter.java.JavaTypeFactory;
    +import org.apache.calcite.avatica.util.Casing;
    +import org.apache.calcite.avatica.util.Quoting;
    +import org.apache.calcite.jdbc.CalciteSchemaImpl;
    +import org.apache.calcite.jdbc.JavaTypeFactoryImpl;
    +import org.apache.calcite.plan.ConventionTraitDef;
    +import org.apache.calcite.plan.RelOptCluster;
    +import org.apache.calcite.plan.RelOptCostFactory;
    +import org.apache.calcite.plan.RelOptTable;
    +import org.apache.calcite.plan.volcano.VolcanoPlanner;
    +import org.apache.calcite.prepare.CalciteCatalogReader;
    +import org.apache.calcite.rel.RelCollationTraitDef;
    +import org.apache.calcite.rel.RelNode;
    +import org.apache.calcite.rel.type.RelDataType;
    +import org.apache.calcite.rel.type.RelDataTypeFactory;
    +import org.apache.calcite.rel.type.RelDataTypeSystemImpl;
    +import org.apache.calcite.rex.RexBuilder;
    +import org.apache.calcite.schema.SchemaPlus;
    +import org.apache.calcite.sql.SqlNode;
    +import org.apache.calcite.sql.SqlOperatorTable;
    +import org.apache.calcite.sql.parser.SqlParseException;
    +import org.apache.calcite.sql.parser.SqlParser;
    +import org.apache.calcite.sql.parser.SqlParserImplFactory;
    +import org.apache.calcite.sql.parser.SqlParserPos;
    +import org.apache.calcite.sql.type.SqlTypeName;
    +import org.apache.calcite.sql.util.ChainedSqlOperatorTable;
    +import org.apache.calcite.sql.validate.SqlConformance;
    +import org.apache.calcite.sql.validate.SqlValidatorCatalogReader;
    +import org.apache.calcite.sql.validate.SqlValidatorImpl;
    +import org.apache.calcite.sql2rel.RelDecorrelator;
    +import org.apache.calcite.sql2rel.SqlToRelConverter;
    +import org.apache.drill.common.exceptions.UserException;
    +import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry;
    +import org.apache.drill.exec.ops.UdfUtilities;
    +import org.apache.drill.exec.planner.cost.DrillCostBase;
    +import org.apache.drill.exec.planner.logical.DrillConstExecutor;
    +import org.apache.drill.exec.planner.physical.DrillDistributionTraitDef;
    +import org.apache.drill.exec.planner.physical.PlannerSettings;
    +import org.apache.drill.exec.planner.sql.parser.impl.DrillParserWithCompoundIdConverter;
    +
    +/**
    + * Class responsible for managing parsing, validation and toRel conversion for sql statements.
    + */
    +public class DrillSqlParser {
    --- End diff --
    
    It is really parsing, validation and sql2rel. However, validation and sql2rel are optional.
Thoughts on a better name? SqlConverter?


> Refactor Parsing and Planning to canonicalize planning and parsing
> ------------------------------------------------------------------
>
>                 Key: DRILL-4465
>                 URL: https://issues.apache.org/jira/browse/DRILL-4465
>             Project: Apache Drill
>          Issue Type: Sub-task
>          Components: Query Planning & Optimization
>            Reporter: Jacques Nadeau
>            Assignee: Jinfeng Ni
>             Fix For: 1.6.0
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message