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

    https://github.com/apache/flink/pull/1958#discussion_r62684793
  
    --- Diff: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/table.scala
 ---
    @@ -472,61 +339,39 @@ class Table(
         tableEnv.emitToSink(this, configuredSink)
       }
     
    -  private def createRenamingProject(exprs: Seq[RexNode]): LogicalProject = 
{
    -
    -    val names = exprs.map{ e =>
    -      e.getKind match {
    -        case SqlKind.AS =>
    -          e.asInstanceOf[RexCall].getOperands.get(1)
    -            .asInstanceOf[RexLiteral].getValue
    -            .asInstanceOf[NlsString].getValue
    -        case SqlKind.INPUT_REF =>
    -          
relNode.getRowType.getFieldNames.get(e.asInstanceOf[RexInputRef].getIndex)
    -        case _ =>
    -          throw new PlanGenException("Unexpected expression type 
encountered.")
    -      }
    -
    -    }
    -    LogicalProject.create(relNode, exprs.toList.asJava, 
names.toList.asJava)
    -  }
    -
       private def checkUniqueNames(exprs: Seq[Expression]): Unit = {
    --- End diff --
    
    Can we move this check into `Project`?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to