-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql: support ordering by JSON (pq: unable to encode table key: *tree.DJSON) #35706
Copy link
Copy link
Labels
A-sql-optimizerSQL logical planning and optimizations.SQL logical planning and optimizations.A-sql-pgcompatSemantic compatibility with PostgreSQLSemantic compatibility with PostgreSQLC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-sql-queriesSQL Queries TeamSQL Queries TeamX-anchored-telemetryThe issue number is anchored by telemetry references.The issue number is anchored by telemetry references.docs-donedocs-known-limitation
Description
Currently it's not possible to order a table by a JSON column or create a primary index on a JSON column.
This is because JSON does not have a valid lexicographic ordering.
This is incidentally the issue underlying #24436 and #35260.
for reference, PostgreSQL supports it.
See also #35730
Epic: CRDB-24501
Jira issue: CRDB-4564
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-sql-optimizerSQL logical planning and optimizations.SQL logical planning and optimizations.A-sql-pgcompatSemantic compatibility with PostgreSQLSemantic compatibility with PostgreSQLC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-sql-queriesSQL Queries TeamSQL Queries TeamX-anchored-telemetryThe issue number is anchored by telemetry references.The issue number is anchored by telemetry references.docs-donedocs-known-limitation
Type
Projects
Status
Done