Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.11.2
Description
When trying to utilize the JDBC Connector for Postgres, I tried to read in a text array. When a row that was null was attempted to be read in, the connector threw an exception and execution stopped. It appears looking at the source code that if the row is null that it will still attempt to grab the contents out: https://github.com/apache/flink/blob/release-1.11.2/flink-connectors/flink-connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/internal/converter/PostgresRowConverter.java#L97
The stack trace is as follows:
[error] Caused by: java.io.IOException: Couldn't access resultSet [error] at org.apache.flink.connector.jdbc.table.JdbcRowDataInputFormat.nextRecord(JdbcRowDataInputFormat.java:266) [error] at org.apache.flink.connector.jdbc.table.JdbcRowDataInputFormat.nextRecord(JdbcRowDataInputFormat.java:57) [error] at org.apache.flink.streaming.api.functions.source.InputFormatSourceFunction.run(InputFormatSourceFunction.java:91) [error] at org.apache.flink.streaming.api.operators.StreamSource.run(StreamSource.java:100) [error] at org.apache.flink.streaming.api.operators.StreamSource.run(StreamSource.java:63) [error] at org.apache.flink.streaming.runtime.tasks.SourceStreamTask$LegacySourceFunctionThread.run(SourceStreamTask.java:213) [error] Caused by: java.lang.NullPointerException [error] at org.apache.flink.connector.jdbc.internal.converter.PostgresRowConverter.lambda$createPostgresArrayConverter$c06ce9f4$2(PostgresRowConverter.java:97) [error] at org.apache.flink.connector.jdbc.internal.converter.AbstractJdbcRowConverter.toInternal(AbstractJdbcRowConverter.java:79) [error] at org.apache.flink.connector.jdbc.table.JdbcRowDataInputFormat.nextRecord(JdbcRowDataInputFormat.java:259) [error] ... 5 more
Attachments
Issue Links
- links to