Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sqlite describe fixes #2253

Merged
merged 26 commits into from Feb 3, 2023
Merged

Conversation

tyrelr
Copy link
Contributor

@tyrelr tyrelr commented Dec 24, 2022

Add reproducers & fixes for various sqlite describe bugs.
Fixes include:

  • fix handling of nested order-by queries
    • handle when sqlite puts a 'record' inside of a blob column
    • handle rewind of an empty table correctly
    • allow opcodes to be evaluated twice per branch path
  • fix retrieval of temporary table column signatures
  • add basic support for date & time functions
  • fix handling of offset clause
    • fix handling of hard-coded large offsets
    • implement IfPos to avoid creating unnecessary branches
  • fix handling of group by clause
    • handle IfNull
    • handle delete statement when grouping with-clause results

@tyrelr
Copy link
Contributor Author

tyrelr commented Dec 24, 2022

Compilation will fail until #2199 is merged.

@abonander abonander merged commit aba5fb8 into launchbadge:0.7-dev Feb 3, 2023
abonander pushed a commit that referenced this pull request Feb 18, 2023
* add failing test for nested orderby

* log query paths which were abandoned due to invalid state or looping.  Allow instructions to be executed a small number of times to fix nested order by query

* add failing testcase using nested orderby

* fix handling of sequence/offset and rewind

* fix handling when sqlite nests records inside of records

* add test of temporary table handling

* WIP add test failure for temp table access

* fix support for temp tables

* add tests for sqlite datetime functions

* add basic date and time function support

* handle gosub opcode correctly

* add group by test

* fix group by handling

* add additional passing group by test

* add test case for simple limit query

* fix IfPos & If touching wrong branches state, fix IfPos using wrong branch criteria

* add test for large offsets

* add short-circuit for possible query offset loops

* add groupby query that is predicted incorrectly

* fix handling of integer cast failures

* add tests for single-row aggregate results

* fix handling of null-based branching

* add test for coercion of text by sum

* fix calculation of sum value coercion

* add failing test for recursive with query

* add logic for delete operation to fix queries grouping by columns from a recursive query
abonander pushed a commit that referenced this pull request Feb 21, 2023
* add failing test for nested orderby

* log query paths which were abandoned due to invalid state or looping.  Allow instructions to be executed a small number of times to fix nested order by query

* add failing testcase using nested orderby

* fix handling of sequence/offset and rewind

* fix handling when sqlite nests records inside of records

* add test of temporary table handling

* WIP add test failure for temp table access

* fix support for temp tables

* add tests for sqlite datetime functions

* add basic date and time function support

* handle gosub opcode correctly

* add group by test

* fix group by handling

* add additional passing group by test

* add test case for simple limit query

* fix IfPos & If touching wrong branches state, fix IfPos using wrong branch criteria

* add test for large offsets

* add short-circuit for possible query offset loops

* add groupby query that is predicted incorrectly

* fix handling of integer cast failures

* add tests for single-row aggregate results

* fix handling of null-based branching

* add test for coercion of text by sum

* fix calculation of sum value coercion

* add failing test for recursive with query

* add logic for delete operation to fix queries grouping by columns from a recursive query
Aandreba pushed a commit to Aandreba/sqlx that referenced this pull request Mar 31, 2023
* add failing test for nested orderby

* log query paths which were abandoned due to invalid state or looping.  Allow instructions to be executed a small number of times to fix nested order by query

* add failing testcase using nested orderby

* fix handling of sequence/offset and rewind

* fix handling when sqlite nests records inside of records

* add test of temporary table handling

* WIP add test failure for temp table access

* fix support for temp tables

* add tests for sqlite datetime functions

* add basic date and time function support

* handle gosub opcode correctly

* add group by test

* fix group by handling

* add additional passing group by test

* add test case for simple limit query

* fix IfPos & If touching wrong branches state, fix IfPos using wrong branch criteria

* add test for large offsets

* add short-circuit for possible query offset loops

* add groupby query that is predicted incorrectly

* fix handling of integer cast failures

* add tests for single-row aggregate results

* fix handling of null-based branching

* add test for coercion of text by sum

* fix calculation of sum value coercion

* add failing test for recursive with query

* add logic for delete operation to fix queries grouping by columns from a recursive query
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants