seatunnel
seatunnel copied to clipboard
[Bug] [connector-jdbc] JDBC get primitive type null value bug
Search before asking
- [X] I had searched in the issues and found no similar issues.
What happened
According to the JDK JDBC interface, when converting to a primitive type, if the column value was null
, the returned values would be the default value of the corresponding primitive type. For example if the value of an type int
in MySQL database is null
, but in Hive it will be 0. This is a bug.
SeaTunnel Version
2.3.3
SeaTunnel Config
env {
job.mode = "BATCH"
}
source {
Jdbc {
url = "jdbc:mysql://localhost:3306"
user = "*******"
password = "******"
driver = "com.mysql.jdbc.Driver"
query = "select id, cast(null AS SIGNED) c_0 from test.abc"
result_table_name = "from_mysql"
}
}
sink {
Console {
source_table_name = "from_mysql"
}
}
Running Command
bin/start-seatunnel-spark-3-connector-v2.sh -m local[1] -c mysql_to_console.conf
Error Exception
No Exception
Zeta or Flink or Spark Version
No response
Java or Scala Version
No response
Screenshots
No response
Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.
This issue has been closed because it has not received response for too long time. You could reopen it if you encountered similar problems in the future.