-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FLINK-24397] Remove TableSchema usages from Flink connectors #17459
Conversation
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community Automated ChecksLast check on commit 69e676d (Tue Oct 12 13:12:07 UTC 2021) Warnings:
Mention the bot in a comment to re-run the automated checks. Review Progress
Please see the Pull Request Review Guide for a full explanation of the review process. The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commandsThe @flinkbot bot supports the following commands:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @fapaul. I added some comments. In particular, I would suggest to scan the changes again whether ResolvedSchema
is used within a TableFactory
. This should not be necessary anymore.
...ase-base/src/main/java/org/apache/flink/connector/hbase/table/HBaseConnectorOptionsUtil.java
Outdated
Show resolved
Hide resolved
...nector-jdbc/src/main/java/org/apache/flink/connector/jdbc/table/JdbcDynamicTableFactory.java
Outdated
Show resolved
Hide resolved
...nector-jdbc/src/main/java/org/apache/flink/connector/jdbc/table/JdbcDynamicTableFactory.java
Outdated
Show resolved
Hide resolved
...connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/table/JdbcDynamicTableSink.java
Outdated
Show resolved
Hide resolved
...nnector-jdbc/src/main/java/org/apache/flink/connector/jdbc/table/JdbcDynamicTableSource.java
Outdated
Show resolved
Hide resolved
* <p>Support cache the result to avoid frequent accessing to remote databases. 1.The cacheMaxSize | ||
* is -1 means not use cache. 2.For real-time data, you need to set the TTL of cache. | ||
*/ | ||
public class JdbcLookupFunction extends TableFunction<Row> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we drop this? is there a similar RowData
one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"VARBINARY(10)", | ||
"The Derby dialect doesn't support type: VARBINARY(10)."), | ||
"BINARY", | ||
"Unsupported conversion from data type 'BINARY(1)' (conversion class: [B) to type information. Only data types that originated from type information fully support a reverse conversion."), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this exception seems wrong. we should not use a conversion from data type to legacy type information anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, I am not really sure what the correct behavior here is. The problem is that this complete test never used the new JDBC connector and always tested with the old one which is now removed. It appears that with the new connector the exception signatures have changed.
Are you proposing to drop the test class completely?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The exception indicates that are using a deprecated utility. We should analyze the stack trace where this exception is coming from.
...rc/main/java/org/apache/flink/streaming/connectors/kafka/table/KafkaDynamicTableFactory.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/apache/flink/streaming/connectors/kafka/table/KafkaDynamicTableFactory.java
Outdated
Show resolved
Hide resolved
69e676d
to
a307c35
Compare
@twalthr thanks for your review, I addressed all comments, can you have another look? |
a307c35
to
77238fc
Compare
77238fc
to
a10953a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update @fapaul. This leaves the code base a better place. I will merge this once the build is green.
@flinkbot run azure |
a10953a
to
0a7a93b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The build succeeded. Merging...
…moving legacy This closes apache#17459.
What is the purpose of the change
The TableSchema has been deprecated for a while now unfortunately many of our connectors still use it. This PR tries to address it and migrates the connectors to the new stack. (Schema/ResolvedSchema)
I'll create a follow-up ticket to do the same for the hive connector because it has some additional complexity. The only other connector which is missing is elasticsearch where we will address the TableSchema usage as part of https://issues.apache.org/jira/browse/FLINK-24323
Brief change log
Verifying this change
Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: (yes / no)Documentation