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

ASF GitHub Bot commented on FLINK-3639:
---------------------------------------

Github user fhueske commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1827#discussion_r57073483
  
    --- Diff: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/plan/schema/TableTable.scala
 ---
    @@ -0,0 +1,55 @@
    +/*
    + * 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.flink.api.table.plan.schema
    +
    +import java.lang.Double
    +import java.util
    +import java.util.Collections
    +
    +import org.apache.calcite.plan.RelOptTable
    +import org.apache.calcite.plan.RelOptTable.ToRelContext
    +import org.apache.calcite.rel.{RelDistribution, RelCollation, RelNode}
    +import org.apache.calcite.rel.`type`.{RelDataType, RelDataTypeFactory}
    +import org.apache.calcite.schema.Schema.TableType
    +import org.apache.calcite.schema.impl.AbstractTable
    +import org.apache.calcite.schema.{TranslatableTable, Statistic}
    +import org.apache.calcite.util.ImmutableBitSet
    +
    +class TableTable(relNode: RelNode) extends AbstractTable with 
TranslatableTable {
    +
    +  override def getStatistic: Statistic = new DefaultTableStatistic
    +
    +  override def getJdbcTableType: TableType = ???
    +
    +  override def getRowType(typeFactory: RelDataTypeFactory): RelDataType = 
relNode.getRowType
    +
    +  override def toRel(context: ToRelContext, relOptTable: RelOptTable): 
RelNode = {
    +    relNode
    +  }
    +}
    +
    +class DefaultTableStatistic extends Statistic {
    --- End diff --
    
    Yes, I think you can but don't have to override it.


> Add methods and utilities to register DataSets and Tables in the 
> TableEnvironment
> ---------------------------------------------------------------------------------
>
>                 Key: FLINK-3639
>                 URL: https://issues.apache.org/jira/browse/FLINK-3639
>             Project: Flink
>          Issue Type: New Feature
>          Components: Table API
>    Affects Versions: 1.1.0
>            Reporter: Vasia Kalavri
>            Assignee: Vasia Kalavri
>
> In order to make tables queryable from SQL we need to register them under a 
> unique name in the TableEnvironment.
> [This design 
> document|https://docs.google.com/document/d/1sITIShmJMGegzAjGqFuwiN_iw1urwykKsLiacokxSw0/edit]
>  describes the proposed API.



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

Reply via email to