zhengxiang378928908-code opened a new issue, #12751: URL: https://github.com/apache/seatunnel/issues/12751
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22) and found no similar issues. ### What happened Reading a Dameng table that contains a `TIMESTAMP WITH LOCAL TIME ZONE` column or any `INTERVAL` column fails while loading the catalog table, so the job stops before any data is read. `DmdbTypeConverter#convert` has cases for `TIME WITH TIME ZONE` and `DATETIME WITH TIME ZONE`, but none for these types, so they fall through to the `default` branch. I checked what Dameng actually reports against a real instance (`laglangyue/dmdb8`, the image used by `JdbcDmIT`; DM V8, `COMPATIBLE_MODE=0`, `LENGTH_IN_CHAR=0`). I created a table per type and loaded it through `DamengCatalog#getTable` on current `dev`: | Declared type | `ALL_TAB_COLUMNS.DATA_TYPE` | Result on `dev` | |---|---|---| | `TIMESTAMP WITH TIME ZONE` | `DATETIME WITH TIME ZONE` | OK, maps to `TIMESTAMP_TZ` | | `TIMESTAMP WITH LOCAL TIME ZONE` | `TIMESTAMP WITH LOCAL TIME ZONE` | **COMMON-20** | | `INTERVAL YEAR TO MONTH` | `INTERVAL YEAR TO MONTH` | **COMMON-20** | | `INTERVAL DAY TO SECOND` | `INTERVAL DAY TO SECOND` | **COMMON-20** | | `INTERVAL YEAR`, `INTERVAL HOUR TO MINUTE`, … | reported verbatim | **COMMON-20** (same path) | `TIMESTAMP WITH TIME ZONE` is already fine, because Dameng normalises it to `DATETIME WITH TIME ZONE`. `TIMESTAMP WITH LOCAL TIME ZONE` is not normalised and is reported under its own name. These are standard Dameng types and part of its Oracle compatibility. `OracleTypeConverter` already handles the Oracle equivalents: `TIMESTAMP WITH LOCAL TIME ZONE` maps to `TIMESTAMP_TZ` (together with `TIMESTAMP WITH TIME ZONE`), and the whole `INTERVAL` family maps to `STRING`. Following the same mapping would keep the Dameng and Oracle dialects consistent. ### SeaTunnel Version dev (b0f6feddf) ### SeaTunnel Config ```sql -- Dameng CREATE TABLE SYSDBA.T_LTZ (ID INT, V TIMESTAMP WITH LOCAL TIME ZONE); CREATE TABLE SYSDBA.T_IYM (ID INT, V INTERVAL YEAR TO MONTH); ``` ```conf source { Jdbc { url = "jdbc:dm://localhost:5236" driver = "dm.jdbc.driver.DmDriver" user = "SYSDBA" password = "SYSDBA" table_path = "SYSDBA.T_LTZ" } } ``` ### Running Command ```shell ./bin/seatunnel.sh --config dm_source.conf -m local ``` ### Error Exception ```log ErrorCode:[COMMON-20], ErrorDescription:['dm' table 'DAMENG.SYSDBA.T_LTZ' unsupported get catalog table with field data types '{"V":"TIMESTAMP WITH LOCAL TIME ZONE"}'] ErrorCode:[COMMON-20], ErrorDescription:['dm' table 'DAMENG.SYSDBA.T_IYM' unsupported get catalog table with field data types '{"V":"INTERVAL YEAR TO MONTH"}'] ErrorCode:[COMMON-20], ErrorDescription:['dm' table 'DAMENG.SYSDBA.T_IDS' unsupported get catalog table with field data types '{"V":"INTERVAL DAY TO SECOND"}'] ``` ### Zeta or Flink or Spark Version Zeta ### Java or Scala Version Java 8 ### 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](https://www.apache.org/foundation/policies/conduct) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
