dawidwys commented on code in PR #25952:
URL: https://github.com/apache/flink/pull/25952#discussion_r1915099838
##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/catalog/JavaCatalogTableTest.java:
##########
@@ -177,6 +177,31 @@ void testTimeAttributeOfView() {
+ "GROUP BY window_start, window_end");
}
+ @TestTemplate
+ void testTimeAttributeOfViewSelect() {
+ if (!streamingMode) {
+ // time attributes not supported in batch
+ return;
+ }
+ TableTestUtil testUtil = getTestUtil();
+ TableEnvironment tableEnvironment = testUtil.getTableEnv();
+ tableEnvironment.registerCatalog("cat", new CustomCatalog("cat"));
Review Comment:
@snuyanzin Are you aware of discussions on actually dropping
`registerCatalog` method? I think `createCatalog` is not and should not be a
directed replacement for `registerCatalog`.
`createCatalog` forces you to provide a catalog via service lookup
mechanism, which is not easy in all cases, especially ones as this one, when
you want to instantiate tables in memory. I don't really see a reason we should
force users to go that route.
Moreover, all other APIs do have a version where you can pass an instance:
```
void createTemporarySystemFunction(String name, UserDefinedFunction
functionInstance);
void createTemporaryFunction(String path, UserDefinedFunction
functionInstance);
void createTemporaryView(String path, Table view);
void createView(String path, Table view);
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]