Details
-
Improvement
-
Status: Open
-
Not a Priority
-
Resolution: Unresolved
-
None
-
None
Description
Currently, the logic of time attribute derivation is different for batch and streaming. For batch table source, the rowtime type will not be generated or will be erased as regular time type if the source table has rowtime type. To handle this difference, we have to distinguish batch or streaming via isStreamingMode flag in many places, such as: DatabaseCalciteSchema, CatalogSchemaTable, CatalogTableSchemaResolver, etc. In fact, batch queries may also need rowtime type, such as supporting rowtime temporal join. So we can unify the logic of time attribute derivation from the source side, and erase the rowtime type if need in optimization phase. And then it's easier to push the unified TableEnvironment and planner forward.