apache / shardingsphere

Distributed SQL transaction & query engine for data sharding, scaling, encryption, and more - on any database.
Apache License 2.0
19.65k stars 6.67k forks source link

insert with cast i joind date type #31946

Closed yvladimirov closed 6 days ago

yvladimirov commented 3 weeks ago

Which version of ShardingSphere did you use?

5.4.1-5.5.0

Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?

ShardingSphere-JDBC

Expected behavior

Jooq+ShardingSphere-JDBC +Postgresql insert into orders (id,cancel_expired_at, multi_order_id) values (?, cast(? as timestamp(6)), cast(? as uuid))

worked

Actual behavior

ERROR: syntax error at or near "astimestamp"

Reason analyze (If you can)

ShardingSphere have problem with parsing function cast in insert case. Antlr join as and date type.

maybe a similar problem https://github.com/apache/shardingsphere/pull/31744

terrymanu commented 2 weeks ago

Could you please pull to this commit and test it?

terrymanu commented 2 weeks ago

The title of this issue is not well enough, could you please update to a more understandable title by summarizing the content?

github-actions[bot] commented 1 week ago

There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.