jpenalver10 commented on issue #37595: URL: https://github.com/apache/shardingsphere/issues/37595#issuecomment-3702418377
Hello, I can't comment the issue because was closed. Ok, understood, but my thought is about what doesn't happens using the classical database stack spring jpa + hibernate + jdbc driver with appropriated dialect but occurs when sharding sphere is used. I just try to understand the whys Thanks Joaquín Peñalver El mié, 31 dic 2025 16:34, Liang Zhang ***@***.***> escribió: > *terrymanu* left a comment (apache/shardingsphere#37595) > <https://github.com/apache/shardingsphere/issues/37595#issuecomment-3702399740> > > Problem Understanding > > - Version 5.5.2, ShardingSphere-JDBC. Hibernate/JPA generates insert > into ... (filterid, filterValues_ORDER, field, values) values (?, ?, ?, ?) > and parsing fails with no viable alternative at the column list. > > Root Cause > > - The column name uses the reserved keyword values without quoting per > dialect. The parser treats values as a keyword, so the SQL is invalid for > the target dialect. This is expected behavior, not a ShardingSphere defect. > > Problem Analysis > > - The error stops at (filterid, filterValues_ORDER, field, values, > showing parsing breaks when hitting values. > - Hibernate does not auto-avoid reserved words; if you choose a > reserved word as a column name, you must rename it or quote it according to > the database dialect (e.g., backticks in MySQL). > - ShardingSphere enforces dialect syntax and will not auto-fix invalid > identifiers. > - Relevant official docs: MySQL keywords > https://dev.mysql.com/doc/refman/8.0/en/keywords.html and identifier > quoting rules https://dev.mysql.com/doc/refman/8.0/en/identifiers.html. > > Conclusion > > - This is a SQL naming issue, not a ShardingSphere bug. Please rename > the column to a non-reserved word or quote it per your database dialect so > the SQL can be parsed and executed. > > — > Reply to this email directly, view it on GitHub > <https://github.com/apache/shardingsphere/issues/37595#issuecomment-3702399740>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AHZJQMBAWK2KA4YFYYJWX3D4EPUINAVCNFSM6AAAAACQMQHYWSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTOMBSGM4TSNZUGA> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> > -- 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]
