[
https://issues.apache.org/jira/browse/FLINK-18580?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Flink Jira Bot updated FLINK-18580:
-----------------------------------
Labels: auto-deprioritized-critical auto-deprioritized-major stale-minor
(was: auto-deprioritized-critical auto-deprioritized-major)
I am the [Flink Jira Bot|https://github.com/apache/flink-jira-bot/] and I help
the community manage its development. I see this issues has been marked as
Minor but is unassigned and neither itself nor its Sub-Tasks have been updated
for 180 days. I have gone ahead and marked it "stale-minor". If this ticket is
still Minor, please either assign yourself or give an update. Afterwards,
please remove the label or in 7 days the issue will be deprioritized.
> Incomplete conversion for MySQL types
> -------------------------------------
>
> Key: FLINK-18580
> URL: https://issues.apache.org/jira/browse/FLINK-18580
> Project: Flink
> Issue Type: Bug
> Components: Connectors / JDBC, Table SQL / Ecosystem
> Affects Versions: 1.11.0
> Reporter: Dawid Wysakowicz
> Priority: Minor
> Labels: auto-deprioritized-critical, auto-deprioritized-major,
> stale-minor
>
> The mapping of types returned from MySQL jdbc driver is incomplete according
> to the table:
> https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-reference-type-conversions.html
> E.g. the {{BIGINT}} does not account for {{java.math.BigInteger}}.
> User reported problem with it:
> {code}
> CREATE TABLE user_account(
> uid BIGINT,
> system_unique_id STRING,
> name STRING,
> account STRING,
> passwd STRING,
> salt STRING,
> type INT,
> avatar STRING,
> source STRING,
> ksjk_existing TINYINT,
> created_at INT,
> updated_at INT,
> deleted_at INT,
> PRIMARY KEY (uid) NOT ENFORCED
> ) WITH (
> 'connector' = 'jdbc',
> 'url' = 'jdbc:mysql://xxx:3306/xxxx',
> 'table-name' = 'user_account',
> 'driver' = 'com.mysql.jdbc.Driver',
> 'username' = 'xxx',
> 'password' = 'xxx'
> );
> {code}
> {code}
> Caused by: java.lang.ClassCastException: java.math.BigInteger cannot be cast
> to java.lang.LongCaused by: java.lang.ClassCastException:
> java.math.BigInteger cannot be cast to java.lang.Long at
> org.apache.flink.table.data.GenericRowData.getLong(GenericRowData.java:154)
> ~[flink-table_2.12-1.11.0.jar:1.11.0] at
> org.apache.flink.table.data.RowData.get(RowData.java:260)
> ~[flink-table_2.12-1.11.0.jar:1.11.0] at
> org.apache.flink.table.runtime.typeutils.RowDataSerializer.toBinaryRow(RowDataSerializer.java:194)
> ~[flink-table-blink_2.12-1.11.0.jar:1.11.0] at
> org.apache.flink.table.runtime.typeutils.RowDataSerializer.serialize(RowDataSerializer.java:97)
> ~[flink-table-blink_2.12-1.11.0.jar:1.11.0] at
> org.apache.flink.table.runtime.typeutils.RowDataSerializer.serialize(RowDataSerializer.java:50)
> ~[flink-table-blink_2.12-1.11.0.jar:1.11.0] at
> org.apache.flink.streaming.runtime.streamrecord.StreamElementSerializer.serialize(StreamElementSerializer.java:175)
> ~[flink-dist_2.12-1.11.0.jar:1.11.0] at
> org.apache.flink.streaming.runtime.streamrecord.StreamElementSerializer.serialize(StreamElementSerializer.java:46)
> ~[flink-dist_2.12-1.11.0.jar:1.11.0] at
> org.apache.flink.runtime.plugable.SerializationDelegate.write(SerializationDelegate.java:54)
> ~[flink-dist_2.12-1.11.0.jar:1.11.0] at
> org.apache.flink.runtime.io.network.api.serialization.SpanningRecordSerializer.serializeRecord(SpanningRecordSerializer.java:71)
> ~[flink-dist_2.12-1.11.0.jar:1.11.0] at
> org.apache.flink.runtime.io.network.api.writer.RecordWriter.emit(RecordWriter.java:117)
> ~[flink-dist_2.12-1.11.0.jar:1.11.0] at
> org.apache.flink.runtime.io.network.api.writer.ChannelSelectorRecordWriter.emit(ChannelSelectorRecordWriter.java:60)
> ~[flink-dist_2.12-1.11.0.jar:1.11.0] at
> org.apache.flink.streaming.runtime.io.RecordWriterOutput.pushToRecordWriter(RecordWriterOutput.java:107)
> ~[flink-dist_2.12-1.11.0.jar:1.11.0] at
> org.apache.flink.streaming.runtime.io.RecordWriterOutput.collect(RecordWriterOutput.java:89)
> ~[flink-dist_2.12-1.11.0.jar:1.11.0]
> {code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)