apache / doris

Apache Doris is an easy-to-use, high performance and unified analytics database.
https://doris.apache.org
Apache License 2.0
11.84k stars 3.12k forks source link

[improvement](jdbc catalog) Delete unnecessary schema and optimize insert logic #37244

Closed zy-kkk closed 1 day ago

zy-kkk commented 2 days ago

pick (#30880)

In the previous design, we were compatible with MySQL's auto-increment column and default value to bypass the null value check when writing back Jdbc External Table. However, because MySQL's default value is not completely unified with Doris, this resulted in The unsuitable default value is wrong. In response to this situation, I made the following optimizations

  1. For JDBC External Table, we always allow certain columns to be missing during insertion. Even if these columns are not allowed to be empty at the source end, the error should be generated by the source end, not Doris herself.
  2. When the target column is non-nullable and the insertion is done via INSERT INTO tbl VALUES() or INSERT INTO tbl SELECT constants, Doris should verify any inconsistency between them and throw an exception. This check is not applied for INSERT INTO tbl SELECT ... FROM tbl operations.
zy-kkk commented 2 days ago

run buildall

github-actions[bot] commented 2 days ago

PR approved by at least one committer and no changes requested.

github-actions[bot] commented 2 days ago

PR approved by anyone and no changes requested.