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

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

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

    https://github.com/apache/flink/pull/1862#discussion_r59181718
  
    --- Diff: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/plan/TranslationContext.scala
 ---
    @@ -53,21 +55,26 @@ object TranslationContext {
         // configure sql parser
         // we use Java lex because back ticks are easier than double quotes in 
programming
         // and cases are preserved
    -    val parserConfig = SqlParser.configBuilder().setLex(Lex.JAVA).build()
    +    val parserConfig = SqlParser
    +      .configBuilder()
    +      .setLex(Lex.JAVA)
    +      .build()
     
         // initialize RelBuilder
         frameworkConfig = Frameworks
           .newConfigBuilder
           .defaultSchema(tables)
           .parserConfig(parserConfig)
           .costFactory(new DataSetCostFactory)
    -      .traitDefs(ConventionTraitDef.INSTANCE)
    +      .programs(Programs.ofRules(FlinkRuleSets.DATASET_OPT_RULES))
    --- End diff --
    
    I think this line can be removed because we set the rules explicitly before 
calling the optimizer.


> Add support for SQL queries in DataSet programs
> -----------------------------------------------
>
>                 Key: FLINK-3640
>                 URL: https://issues.apache.org/jira/browse/FLINK-3640
>             Project: Flink
>          Issue Type: New Feature
>          Components: Table API
>    Affects Versions: 1.1.0
>            Reporter: Vasia Kalavri
>            Assignee: Vasia Kalavri
>
> This issue covers the task of supporting SQL queries embedded in DataSet 
> programs. In this mode, the input and output of a SQL query is a Table. For 
> this issue, we need to make the following additions to the Table API:
> - add a {{tEnv.sql(query: String): Table}} method for converting a query 
> result into a Table
> - integrate Calcite's SQL parser into the batch Table API translation process.



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

Reply via email to