Skip to content

feat: Support column_policy table option for CrateDB OBJECT type #269

@coderabbitai

Description

@coderabbitai

Overview

During the review of PR #27 (adding test_ddl_with_json_columns), the question was raised whether the dialect should also support and test CrateDB's column_policy table option (e.g. STRICT, DYNAMIC, IGNORED) in DDL generation.

Background

column_policy is a CrateDB table-level option that controls how columns are handled when inserting data that does not match the defined schema. It is not currently implemented in the dialect.

Currently implemented CrateDB-specific dialect options are:

  • crate_number_of_shards
  • crate_clustered_by
  • crate_number_of_replicas
  • crate_partitioned_by
  • crate_index
  • crate_columnstore

The ObjectType implementation does not currently handle any DDL-specific extras beyond what is defined in src/sqlalchemy_cratedb/type/object.py (lines 64–79).

Tasks

  • Investigate whether column_policy should be added as a supported table option in the CrateDB dialect
  • If implemented, add corresponding DDL compiler tests (e.g. column_policy = 'strict', column_policy = 'dynamic', column_policy = 'ignored')

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions