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

Implement a "SQL Row" type descriptor #8109

Merged
merged 6 commits into from
Dec 13, 2024
Merged

Implement a "SQL Row" type descriptor #8109

merged 6 commits into from
Dec 13, 2024

Conversation

1st1
Copy link
Member

@1st1 1st1 commented Dec 12, 2024

Couple of notes:

  • A dedicated descriptor is needed to reduce complexity in client libraries, as the "record" type has a different API from the "free object" type. Adding multiple cases to the codecs pipeline to track what language was used -- EdgeQL or SQL -- is more error prone and time consuming than adding a dedicated descriptor.

  • This commit uses a hack to call the compiler process to build the actual descriptor. The IO<->compiler RPC code is incredibly complex and brittle, so adding two new remote methods would require copy/pasting (as well as careful testing) of a lot of code that manages compiler state and related optimizations.

    It's easier to leave all of that code alone and multiplex the new method into the existing compile() and compile_in_tx().

    An alternative would be quite an invasive refactoring of the entire compiler_pool package, something that I'd like to avoid, especially that close to the release.

@1st1 1st1 requested review from msullivan, elprans and fantix December 12, 2024 05:52
1st1 added 3 commits December 12, 2024 14:08
Couple of notes:

* A dedicated descriptor is needed to reduce complexity in client
  libraries, as the "record" type has a different API from the
  "free object" type. Adding multiple cases to the codecs pipeline
  to track what language was used -- EdgeQL or SQL -- is more error
  prone and time consuming than adding a dedicated descriptor.

* This commit uses a hack to call the compiler process to
  build the actual descriptor. The IO<->compiler RPC code is
  incredibly complex and brittle, so adding two new remote methods
  would require copy/pasting (as well as careful testing) of a lot
  of code that manages compiler state and related optimizations.

  It's easier to leave all of that code alone and multiplex the new
  method into the existing `compile()` and `compile_in_tx()`.

  An alternative would be quite an invasive refactoring of the
  entire compiler_pool package, something that I'd like to avoid,
  especially that close to the release.
@1st1 1st1 requested a review from elprans December 12, 2024 22:23
@1st1
Copy link
Member Author

1st1 commented Dec 12, 2024

This PR depends on geldata/gel-python#560 and then a new version of edgedb-python

@1st1 1st1 merged commit c95a0f8 into master Dec 13, 2024
23 checks passed
@1st1 1st1 deleted the redo_sql2 branch December 13, 2024 00:22
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.

2 participants