Skip to content
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

[Bug] [connector-jdbc] JDBC get primitive type null value bug #6567

Closed
3 tasks done
lastbus opened this issue Mar 25, 2024 · 2 comments
Closed
3 tasks done

[Bug] [connector-jdbc] JDBC get primitive type null value bug #6567

lastbus opened this issue Mar 25, 2024 · 2 comments

Comments

@lastbus
Copy link

lastbus commented Mar 25, 2024

Search before asking

  • 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?

  • Yes I am willing to submit a PR!

Code of Conduct

Copy link

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.

@github-actions github-actions bot added the stale label Apr 25, 2024
Copy link

github-actions bot commented May 8, 2024

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.

@github-actions github-actions bot closed this as completed May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant