WrenAI
WrenAI copied to clipboard
Calculated Field names containing SQL reserved words will cause parse error
Describe the bug
If column names or calculated field names in mdl are SQL reserved words e.g. from, it is possible that the generated SQL query causes parse error if LLM fail to add quotes around them.
To Reproduce Steps to reproduce the behavior:
- create a CF and name it with SQL reserved words ( for ex. create a CF named “ Select” in the orders table
- deploy the models
- ask a question “ show me the orders table details”
- you will see the error msg “ no relevant SQL”
Expected behavior Should inform user if SQL reserved words are not allowed, or add quote around the reserved words to prevent the issue happening.
Hey @wwwy3y3 i would like to work on this issue...can you assign it to me?
@Smartmind12 assigned.