wuchong commented on issue #8678: [FLINK-12708][table] Introduce new source and sink interfaces to make Blink runner work URL: https://github.com/apache/flink/pull/8678#issuecomment-501128458 Hi @aljoscha , Thanks very much for the suggestions. Regarding to the `TableStats`. The `TableStats` is the statistics of a table (e.g. row count, ndv, max/min...). It is important information during optimization and is important for the performance improvement of TP-CDS. The `TableStats` was already there but didn't work with `TableSource`. So we expose the `TableStats` in `TableSource`, to support reporting statistics for a table source in this PR. Regarding to the name of `LookupableTableSource`, do you think the `lookupable` is not appropriate? We use the lookup terminology in Blink runner including lookup join, lookup function, lookup tablesource. If we use `QueryableTableSource` it might be not align with other terminologies. And we add a `able` suffix to `lookup` to indicate it is a table source which has the ability to lookup, similar to `FilterableTableSource`. Regarding to the only one `getLookupFunction()`, I'm afraid we can't, because `AsyncTableFunction` doesn't extend `TableFunction`. The same super interface is `UserDefinedFunction`. But IMO, returning a `UserDefinedFunction` is not appropriate here. I have an idea to make the interface only have one method. That is introuding a `LookupFunctionProvider`. I have created a gist for this idea: https://gist.github.com/wuchong/78fa3fa40323543aac8297fbecae09d8. What do you think about this? Regarding to how to implement a lookup function, yes, it is not clear in the Javadoc. Because lookup join uses `TableFunction` as a lookup function, the `TableFunction` is not just used as lookup. So we may can't add the lookup function implementation details to the Javadoc of `TableFunction`. I will add some more instruction to the Javadoc of `getLookupFunction()` and also the documentation with example in the future.
---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services