tencentmusic / supersonic

SuperSonic is the next-generation BI platform that integrates Chat BI (powered by LLM) and Headless BI (powered by semantic layer) paradigms.
Other
1.78k stars 282 forks source link

[Bug] 针对pg数据库对where条件做to_char时间转换时表达式右侧的值未转换成字符串类型 #1384

Open wangwz587 opened 2 weeks ago

wangwz587 commented 2 weeks ago

Search before asking

Version

0.9.4

What's Wrong?

生成的语义sql如下: image 转换成pg执行的sql如下: image 此sql是错误的无法执行。

What You Expected?

pg对where条件和having条件等做to_char转换时需要将表达式右侧的数值类型转换为字符串类型的值。

How to Reproduce?

No response

Anything Else?

Are you willing to submit PR?

Code of Conduct

mainmainer commented 2 weeks ago

模型生成的SQL是啥样的? @wangwz587

wangwz587 commented 2 weeks ago

跟修正S2SQL一样的