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

    https://github.com/apache/flink/pull/3808#discussion_r114913659
  
    --- Diff: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/nodes/datastream/StreamTableSourceScan.scala
 ---
    @@ -37,7 +38,50 @@ class StreamTableSourceScan(
       extends PhysicalTableSourceScan(cluster, traitSet, table, tableSource)
       with StreamScan {
     
    -  override def computeSelfCost(planner: RelOptPlanner, metadata: 
RelMetadataQuery): RelOptCost = {
    +  override def deriveRowType() = {
    +    val flinkTypeFactory = 
cluster.getTypeFactory.asInstanceOf[FlinkTypeFactory]
    +
    +    def removeIndex[T](idx: Int, l: List[T]): List[T] = {
    +      if (l.size < idx) {
    +        l
    +      } else {
    +        l.take(idx) ++ l.drop(idx + 1)
    +      }
    +    }
    +
    +    var fieldNames = TableEnvironment.getFieldNames(tableSource).toList
    +    var fieldTypes = 
TableEnvironment.getFieldTypes(tableSource.getReturnType).toList
    +
    +    val rowtime = tableSource match {
    +      case timeSource: DefinedTimeAttributes if 
timeSource.getRowtimeAttribute != null =>
    --- End diff --
    
    There are no tests for `TableSource`s that implement `DefinedTimeAttributes`


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