cockroachdb / cockroachdb/cockroach
jsonpath: differences in normalizing
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
Found via `pg_regress`.
The following queries deviate from PG.
```sql
select '$+1'::jsonpath;
select '$-1'::jsonpath;
select '$--+1'::jsonpath;
select '(1).type()'::jsonpath;
select '1.2.type()'::jsonpath;
select '((($ + 1)).a + ((2)).b ? ((((@ > 1)) || (exists(@.c)))))'::jsonpath;
select '$ ? (@.a < 1e1)'::jsonpath;
select '0.0'::jsonpath;
select '0.0010'::jsonpath;
select '1.2.e'::jsonpath;
```
These ones result in an error in PG:
```sql
select '00'::jsonpath;
select '0755'::jsonpath;
```
Jira issue: CRDB-49899
Contributor guide
Research direction
Start with pg_regress and reproduce the listed jsonpath queries in CockroachDB and PostgreSQL, comparing normalization and error behavior. Trace the jsonpath parsing or normalization entry point identified while reproducing them. Done means every query matches PostgreSQL, including errors for the invalid numeric forms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, sql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100