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

    https://github.com/apache/flink/pull/2102#discussion_r67233943
  
    --- Diff: 
flink-libraries/flink-table/src/test/scala/org/apache/flink/api/scala/batch/sql/SelectITCase.scala
 ---
    @@ -146,4 +148,21 @@ class SelectITCase(
         tEnv.sql(sqlQuery)
       }
     
    +  @Test
    +  def testConstantReduce(): Unit = {
    --- End diff --
    
    I think the assertion of this this test should not check the name of the 
generate Flink operator.
    Instead I propose the following:
    - split the `translate()` method into an `optimize()` method that generates 
the optimized `RelNode` tree and a `translate()` method that translates into a 
`DataSet` / `DataStream` program.
    - make the `optimize()` method `private[flink]` and therefore accessible 
from a unit test
    - add a `BatchTableEnvironmentTest` and a `StreamTableEnvironmentTest` 
which check that the optimized `RelNode` tree contains reduced expressions.


---
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