WrenAI icon indicating copy to clipboard operation
WrenAI copied to clipboard

Calculated Field names containing SQL reserved words will cause parse error

Open imAsterSun opened this issue 1 year ago • 2 comments

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:

  1. create a CF and name it with SQL reserved words ( for ex. create a CF named “ Select” in the orders table
  2. deploy the models
  3. ask a question “ show me the orders table details”
  4. 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.

imAsterSun avatar Jul 11 '24 08:07 imAsterSun

Hey @wwwy3y3 i would like to work on this issue...can you assign it to me?

Smartmind12 avatar Oct 05 '24 07:10 Smartmind12

@Smartmind12 assigned.

fredalai avatar Oct 05 '24 07:10 fredalai