confluentinc / confluentinc/confluent-sql
Publish the Flink-type-name → Python-type table as public API
- Dominant language
- Python
- Stars
- 6
- Forks
- 1
- Avg merge
- 21h 47m
- Merged PRs (30d)
- 26
Description
types.py already has exactly the table a SQLAlchemy dialect (or any other integration) needs
for mapping Flink SQL type names to Python types — it's just private:
# src/confluent_sql/types.py:1467
_flink_type_name_to_converter_map: dict[str, type[TypeConverter]] = { ... }
Not exported in types.py's __all__, not re-exported from the package __init__.py. Today,
any integration needing this mapping (the planned SQLAlchemy dialect's ischema_names, a future
dbt adapter revision, documentation generation, anything) has exactly two bad options: reach into
a private, underscore-prefixed module attribute, or hand-copy the ~30-entry table and let it
silently drift out of sync every time a new Flink type is added here.
Proposed: promote a read-only, documented view of this table to public API — e.g.
FLINK_TYPE_CONVERTERS: Mapping[str, type[TypeConverter]] = MappingProxyType(
_flink_type_name_to_converter_map
)
exported via types.py's __all__ and re-exported from confluent_sql/__init__.py, alongside
(or instead of) a small accessor function if hiding the TypeConverter class shape is preferred
over exposing it directly. Either way, this becomes the one authoritative source both the
existing driver and any future dialect key off of — new Flink types added here automatically
become visible to the dialect's type mapping with no separate PR needed on that side.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.