[
https://issues.apache.org/jira/browse/FLINK-3639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15207249#comment-15207249
]
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_r57064833
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/plan/TranslationContext.scala
---
@@ -59,29 +64,55 @@ object TranslationContext {
.traitDefs(ConventionTraitDef.INSTANCE)
.build
- tabNames = Map[AbstractTable, String]()
-
+ tablesRegistry = Map[String, AbstractTable]()
relBuilder = RelBuilder.create(frameworkConfig)
-
nameCntr.set(0)
}
def addDataSet(newTable: DataSetTable[_]): String = {
+ val tabName = "DataSetTable_" + nameCntr.getAndIncrement()
+ tables.add(tabName, newTable)
+ tabName
+ }
+
+ @throws[TableException]
+ def addAndRegisterDataSet(table: DataSetTable[_], name: String): Unit = {
--- End diff --
I think `addAndRegisterDataSet(DataSetTable, String)` and
`registerTable(TableTable, String)` can be combined to
`registerTable(AbstractTable, String)`
> 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)