Skip to content

mlflow_cratedb/patch/mlflow/model.py: Submit polyfill patches (uniqueness constraints, DML refresh) to sqlalchemy-cratedb #267

Description

@coderabbitai

Background

Two polyfill functions in mlflow_cratedb/patch/mlflow/model.py carry TODO notes to submit the patches upstream to crate-python:

polyfill_uniqueness_constraints (line 10):

# TODO: Submit patch to `crate-python`, to be enabled by a
#       dialect parameter `crate_polyfill_unique` or such.

polyfill_refresh_after_dml (line 49):

# TODO: Submit patch to `crate-python`, to be enabled by a
#       dialect parameter `crate_dml_refresh` or such.

Both polyfills compensate for CrateDB dialect limitations (no native UNIQUE constraints, eventual consistency for reads after writes) that ideally belong in the sqlalchemy-cratedb SQLAlchemy dialect as opt-in dialect parameters.

Tasks

  1. Open issues / PRs in the crate/sqlalchemy-cratedb repository for:
    • A dialect parameter crate_polyfill_unique (or similar) to enable automatic uniqueness polyfilling.
    • A dialect parameter crate_dml_refresh (or similar) to enable automatic REFRESH TABLE after DML operations.
  2. Once accepted and released in sqlalchemy-cratedb, replace the local polyfill implementations in this repository with dialect parameter configuration.

References

/cc @amotl

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions