Update infinity json_extract_string usage (#18139)

### Summary

Update infinity json_extract_string usage. 

Example: json_extract_string(chunk_data, '$.name') LIKE '%Alice%'
This commit is contained in:
qinling0210
2026-08-12 10:59:22 +08:00
committed by GitHub
parent c0274fff19
commit b73aac38f4
2 changed files with 4 additions and 4 deletions

View File

@@ -1141,8 +1141,8 @@ RULES:
- Question mentions "not null" or "excluding null"
- Add NULL check for count specific column
- DO NOT add NULL check for COUNT(*) queries (COUNT(*) counts all rows including nulls)
7. json_extract_string() returns JSON-quoted strings ("value"), so WHERE comparisons MUST wrap values in double-quotes inside single-quotes (no spaces between quotes): '"value"' (e.g. WHERE json_extract_string(chunk_data, '$.name') = '"Alice"')
8. For partial text search, use LIKE with wildcards: '"%value%"' (e.g. WHERE json_extract_string(chunk_data, '$.name') LIKE '"%Alice%"')
7. json_extract_string() returns plain (unquoted) strings, so WHERE comparisons use plain single-quoted values: 'value' (e.g. WHERE json_extract_string(chunk_data, '$.name') = 'Alice')
8. For partial text search, use LIKE with wildcards: '%value%' (e.g. WHERE json_extract_string(chunk_data, '$.name') LIKE '%Alice%')
9. Output ONLY the SQL, no explanations"""
user_prompt = """Table: {}
Fields (EXACT case): {}