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] [sql] dinky-pg.sql file has some sql error #2562

Closed
3 tasks done
mengyueyue opened this issue Nov 22, 2023 · 3 comments
Closed
3 tasks done

[Bug] [sql] dinky-pg.sql file has some sql error #2562

mengyueyue opened this issue Nov 22, 2023 · 3 comments
Labels
Bug Something isn't working
Milestone

Comments

@mengyueyue
Copy link

mengyueyue commented Nov 22, 2023

Search before asking

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

What happened

i'm using pg db, then use dinky-pg.sql to create tables met sql error when execute sql

  1. problem 1 (use not exist table)
    image

dinky_schema_history、dinky_task_statement、dinky_upload_file_record all has this problem

  1. problem 2 (wrong single quote escaping)
    image

The following three sql have the same problem

INSERT INTO public.dinky_alert_rules (id, name, rule, template_id, rule_type, trigger_conditions, description, enabled, create_time, update_time) VALUES (3, 'alert.rule.jobFail', '[{"ruleKey":"jobInstance.status","ruleOperator":"EQ","ruleValue":"\'FAILED\'","rulePriority":"1"}]', 1, 'SYSTEM', ' or ', '', 1, '1970-01-01 00:00:00', '2023-09-04 23:03:02');

INSERT INTO public.dinky_alert_rules (id, name, rule, template_id, rule_type, trigger_conditions, description, enabled, create_time, update_time) VALUES (4, 'alert.rule.getJobInfoFail', '[{"ruleKey":"jobInstance.status","ruleOperator":"EQ","ruleValue":"\'UNKNOWN\'","rulePriority":"1"}]', 1, 'SYSTEM', ' or ', '', 1, '1970-01-01 00:00:00', '2023-09-05 18:03:43');

INSERT INTO public.dinky_alert_rules (id, name, rule, template_id, rule_type, trigger_conditions, description, enabled, create_time, update_time) VALUES (5, 'alert.rule.jobRestart', '[{"ruleKey":"jobInstance.status","ruleOperator":"EQ","ruleValue":"\'RESTARTING\'","rulePriority":"1"}]', 1, 'SYSTEM', ' or ', '', 1, '1970-01-01 00:00:00', '2023-09-06 21:35:12');

correct is : "''FAILED''"

  1. problem 3 (error data type)

image

there would be int4_ops not int2_ops , because resources_id data type is int4 in dinky_udf_manage table

What you expected to happen

all sql result is ok

How to reproduce

just execute dinky-pg.sql in pg db

Anything else

every time

Version

dev

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@mengyueyue mengyueyue added Bug Something isn't working Waiting for reply Waiting for reply labels Nov 22, 2023
@Zzm0809
Copy link
Contributor

Zzm0809 commented Nov 22, 2023

同步最新代码

@Zzm0809 Zzm0809 removed the Waiting for reply Waiting for reply label Nov 22, 2023
@Zzm0809 Zzm0809 changed the title [Bug] [Real-time Computing Platform] dinky-pg.sql file has some sql error [Bug] [sql] dinky-pg.sql file has some sql error Nov 22, 2023
@mengyueyue
Copy link
Author

@Zzm0809 你好,通过同步最新代码,发现社区已经解决了problem1,但是2和3还是存在的

@Zzm0809
Copy link
Contributor

Zzm0809 commented Dec 4, 2023

@Zzm0809 你好,通过同步最新代码,发现社区已经解决了problem1,但是2和3还是存在的

@mengyueyue 如还存在, 欢迎来修复

@gaoyan1998 gaoyan1998 added this to the 1.0.0 milestone Dec 25, 2023
@gaoyan1998 gaoyan1998 moved this to ToDo in Dinky Roadmap Dec 25, 2023
@gaoyan1998 gaoyan1998 moved this from ToDo to Done in Dinky Roadmap Jan 2, 2024
@Zzm0809 Zzm0809 closed this as completed Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

3 participants