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] [dinky-metadata] datasource oracle generate sql all column type is string #3409

Closed
3 tasks done
xiaofan2022 opened this issue Apr 17, 2024 · 4 comments
Closed
3 tasks done
Labels
Duplicate This issue or pull request already exists

Comments

@xiaofan2022
Copy link
Contributor

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

generate sql:
DROP TABLE IF EXISTS EXAMPLE_TABLE;
CREATE TABLE IF NOT EXISTS EXAMPLE_TABLE (
ID STRING,
VARCHAR_COL STRING,
CHAR_COL STRING,
NUMERIC_COL1 STRING,
NUMERIC_COL2 STRING,
DATE_COL STRING,
TIMESTAMP_COL STRING,
CLOB_COL STRING,
BLOB_COL STRING) WITH (
)
all cloumn type is string

What you expected to happen

Generate sql based on type mappinghttps://nightlies.apache.org/flink/flink-docs-release-1.19/docs/connectors/table/jdbc/#data-type-mapping

How to reproduce

oracle ddl:
CREATE TABLE example_table
(
id NUMBER(10, 0),
varchar_col VARCHAR2(100),
char_col CHAR(10),
numeric_col1 NUMBER(10, 2),
numeric_col2 NUMBER,
date_col DATE,
timestamp_col TIMESTAMP,
clob_col CLOB,
blob_col BLOB
);
use datasource->generate sql

Anything else

No response

Version

dev

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@xiaofan2022 xiaofan2022 added Bug Something isn't working Waiting for reply Waiting for reply labels Apr 17, 2024
@xiaofan2022
Copy link
Contributor Author

I see that the OracleTypeConvert class in the code defines the relationship between db types and java types. Then we generate database field types from java types and documents, so why not directly use database types to generate table types according to document rules? image

@aiwenmo
Copy link
Contributor

aiwenmo commented Apr 18, 2024

The reason is to reduce workload.
This is a feasible solution that use database types to generate table types according to document rules.

@aiwenmo aiwenmo removed the Waiting for reply Waiting for reply label Apr 18, 2024
@Zzm0809
Copy link
Contributor

Zzm0809 commented Apr 19, 2024

maybe like issue #3346

@Zzm0809 Zzm0809 added Duplicate This issue or pull request already exists and removed Bug Something isn't working labels Apr 19, 2024
Copy link

Hello @xiaofan2022, thank you for your feedback, but this issue has been reported before. You can search for keywords in the Issue list to view it. Issues are marked as `Duplicate`.

你好 @xiaofan2022, 感谢你的反馈, 但是此问题已经被反馈过了,你可以在 Issue 列表中搜索关键字来查看, Issues 标注为 `Duplicate` 。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants