Skip to content

dolthub/doltgresql#1057 allow unquoted STATUS keyword in DESCRIBE statements#2136

Merged
fulghum merged 1 commit intodolthub:mainfrom
codeaucafe:codeaucafe/1057/fix-describe-dolt-status
Dec 22, 2025
Merged

dolthub/doltgresql#1057 allow unquoted STATUS keyword in DESCRIBE statements#2136
fulghum merged 1 commit intodolthub:mainfrom
codeaucafe:codeaucafe/1057/fix-describe-dolt-status

Conversation

@codeaucafe
Copy link
Copy Markdown
Contributor

IMPORTANT

Below is the summary of the cause of the bug in #1057 and the simple fix, but I want to clarify this is the desired fix.

Summary

  • Fixes DESCRIBE dolt.status failing with "at or near 'status': syntax error"
  • Adds STATUS to the simple_ident grammar rule in sql.y, following the pattern established for PUBLIC in PR Support for DESCRIBE <table> with AS OF #828
  • Enables the previously skipped test for this functionality

Background

The simple_ident rule is used for parsing table name components in DESCRIBE statements. It only allowed IDENT tokens and the explicitly added PUBLIC keyword. Since STATUS is an unreserved keyword (not a regular identifier), the parser rejected it unless quoted.

Before: DESCRIBE dolt.status fails, DESCRIBE dolt."status" works
After: Both work

Test Plan

DESCRIBE dolt.status test now passes (TestUserSpaceDoltTables/dolt_status)

Fixes #1057

Add STATUS to the simple_ident grammar rule to fix syntax error when
running DESCRIBE dolt.status without quoting the table name.

The simple_ident rule only allowed IDENT tokens and PUBLIC keyword.
Since STATUS is defined as an unreserved keyword in the grammar, it
was rejected in DESCRIBE statements unless quoted. This follows the
same pattern used when PUBLIC was added in PR dolthub#828.

Enable the previously skipped test that validates this fix.

Refs: dolthub#1057
codeaucafe added a commit to codeaucafe/doltgresql that referenced this pull request Dec 20, 2025
Remove skip list entries for tests that were previously panicking due
to a bug in go-mysql-server's index range building for OR conditions.
The bug occurred when OR conditions mixed indexed and non-indexed
columns (e.g., `SELECT * FROM t WHERE pk = 1 OR col = 1`).

The upstream fix in go-mysql-server PR dolthub#2136 appears to have resolved
this by properly handling OR conjunctions where non-indexed columns are
present, falling back to table scan instead of attempting an invalid
index lookup.

Tests removed from skip list:
- Complex Filter Index Scan dolthub#2
- Complex Filter Index Scan dolthub#3
- complicated range tree

All three tests now pass with the current go-mysql-server dep.

Refs: dolthub#1868
@codeaucafe codeaucafe changed the title dolthub/doltgresql allow unquoted STATUS keyword in DESCRIBE statements dolthub/doltgresql#1057 allow unquoted STATUS keyword in DESCRIBE statements Dec 21, 2025
@fulghum fulghum merged commit f23b522 into dolthub:main Dec 22, 2025
21 checks passed
@fulghum
Copy link
Copy Markdown
Contributor

fulghum commented Dec 22, 2025

Thanks for the contribution @codeaucafe! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

describe dolt.status doesn't work

3 participants