Open kellan04 opened 1 week ago
I'm running into the same issue. The leading (
character is getting removed during SQL extraction.
LLM Response:
(
SELECT ****
LIMIT 1)
UNION ALL
(
SELECT ****
LIMIT 1
);
Extracted SQL: SELECT ****
LIMIT 1)
UNION ALL
(
SELECT ****
LIMIT 1
);
An error occurred while executing SQL: syntax error at or near ")"
I'm running into the same issue. The leading
(
character is getting removed during SQL extraction.LLM Response: ( SELECT **** LIMIT 1) UNION ALL ( SELECT **** LIMIT 1 ); Extracted SQL: SELECT **** LIMIT 1) UNION ALL ( SELECT **** LIMIT 1 ); An error occurred while executing SQL: syntax error at or near ")"
yes, that is why I use the new regex.
@kellan04 yup, your regex worked and I'm using it.
When parentheses appear at the beginning and end of the SQL statement generated by the large model, it is impossible to extract the complete SQL using regular expressions.
Scenario: There are two data tables, and the query is intended to perform a cross-table query. An example of the generated SQL is:
(SELECT xxx) UNIT (SELECT xxx);
The source code does not support recognition:
src/vanna/base/base.py
My modified version: