Files
superset2/tests/unit_tests/sql
Claude Code b0fd51fe24 test(sql): SHOW statements must not get a forced LIMIT (#36939)
set_limit_value's FORCE_LIMIT path unconditionally sets
_parsed.args["limit"] on any statement, including SHOW TABLES/
DATABASES/CREATE TABLE. sqlglot's Show expression has no real LIMIT
slot to hold that value, so it renders a malformed statement with two
LIMIT keywords instead of rejecting cleanly. StarRocks (and likely
other engines using FORCE_LIMIT) reject the result outright, which is
exactly the "Unexpected input 'LIMIT'" error reported in #36939 for
SHOW TABLES / SHOW DATABASES / SHOW CREATE TABLE.

This is unrelated to the other two statements in that issue (REFRESH
EXTERNAL TABLE, DROP ... FORCE) — those fail to parse at the sqlglot
layer entirely, confirmed still true against the pinned sqlglot
30.12.0 for every dialect tried, not just starrocks. That's an
upstream sqlglot dialect gap, not something fixable in this repo, so
it's out of scope here.

This is a test-only PR; the test is expected to be RED (confirms the
bug, does not fix it). Not using a closing keyword since merging this
alone won't resolve #36939.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-29 16:31:09 -07:00
..