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

    https://github.com/apache/flink/pull/4746#discussion_r142800611
  
    --- Diff: 
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/utils/CheckExpressionsTableSource.scala
 ---
    @@ -0,0 +1,65 @@
    +/*
    + * 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.table.utils
    +
    +import org.apache.flink.api.java.typeutils.RowTypeInfo
    +import org.apache.flink.api.java.{DataSet, ExecutionEnvironment}
    +import org.apache.flink.streaming.api.datastream.DataStream
    +import 
org.apache.flink.streaming.api.environment.StreamExecutionEnvironment
    +import org.apache.flink.table.expressions.Expression
    +import org.apache.flink.table.sources.{BatchTableSource, 
FilterableTableSource, StreamTableSource}
    +import org.apache.flink.types.Row
    +
    +import java.util
    +import java.util.Collections
    +
    +import scala.collection.JavaConverters._
    +
    +/**
    +  * A table source that takes in assertions and applies them when 
applyPredicate is called.
    +  * Allows for testing that expression push downs are handled properly
    +  * @param typeInfo The type info.
    +  * @param assertions A set of assertions as a function reference
    +  * @param pushedDown Whether this has been pushed down/
    +  */
    +class CheckExpressionsTableSource(typeInfo: RowTypeInfo,
    --- End diff --
    
    I'll look at doing that.  It was my initial approach, but when I saw the 
potential set of test cases that would impact, I decided to do something more 
conservative.  Still do-able.


---

Reply via email to