You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/05/21 08:44:45 UTC

[GitHub] [flink] danny0405 commented on a change in pull request #12260: [FLINK-17189][table-planner] Table with proctime attribute cannot be read from Hive catalog

danny0405 commented on a change in pull request #12260:
URL: https://github.com/apache/flink/pull/12260#discussion_r428524670



##########
File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/sources/TableSourceUtil.scala
##########
@@ -238,6 +250,14 @@ object TableSourceUtil {
     }
   }
 
+  private def containsTimeAttribute(tableSchema: TableSchema): Boolean = {
+    tableSchema.getWatermarkSpecs.nonEmpty || tableSchema.getTableColumns.exists(isProctime)
+  }
+
+  private def isProctime(column: TableColumn): Boolean = {
+    toScala(column.getExpr).exists(_.equalsIgnoreCase("proctime()"))
+  }

Review comment:
       Actually `proctime(    )` should also work, i'm thinking if we can use the `Sqlparser` to parse the expr first, if we got one `SqlUnresolvedFunction` with no operands and its name matches `proctime`, the we can go ahead.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org