Repository navigation
feat(core-spec): add TRINO to Dialect enum - #607
MahmoudHassanen99 wants to merge 19 commits into
Conversation
kayemkim
left a comment
There was a problem hiding this comment.
converter-hex-ci runs on a python/** change, and with this branch merged onto current main (53418ba) its tests/cli/test_cli_export.py::test_invalid_dialect fails: the --dialect choices are built from OssieDialect, so the snapshot now ends in ossie_sql_2026, trino. The same enum drives _to_sqlglot_dialect in load_ossie_dialect_expression.py, which ends in assert_never, so ossie-hex export of a document with a TRINO expression stops with Expected code to be unreachable, but got: <OssieDialect.TRINO: 'TRINO'>, where main rejects that document at load. Hex's own dialect names include trino and its vendored sqlglot has SQLGlotDialect.TRINO, so this is OssieDialect.TRINO: "trino" in _DIALECT_NAME_MAP, a TRINO branch in _to_sqlglot_dialect, a row in test_convert_ossie_dialect.py and the snapshot update, which is what #598 did for POSTGRES and REDSHIFT.
The Holistics converter keeps SQLGLOT_DIALECT in sqlrefs.py, which its comment says mirrors DIALECT_MAP, and JB asked #598 to carry its dialects there in the same PR. Without "TRINO": "trino" a Trino body is read with sqlglot's default reader and trino is missing from the --sql-dialect choices. Its suite passes either way, 92 passed here. #598 also added the new names to converters/holistics/docs/limitations.md.
The hex snapshot applies to #558 as well, since CLICKHOUSE joins OssieDialect there too and hex has a clickhouse dialect name.
|
A note on the Holistics part above: #612 adds a test that compares |
|
Hi @kayemkim, Thanks a lot for the detailed guidance and review! I really appreciate you pointing these out. I have updated the branch to cover all downstream requirements across the Hex and Holistics converters:
I am very grateful for your help on this. Please let me know if any further changes or refinements are needed! |
Summary
Registers
TRINOin the core-specDialectenum across all core specification and model mapping files.Updated Files:
core-spec/spec.mdcore-spec/ossie-schema.jsoncore-spec/spec.yamlpython/src/ossie/models.pyscripts/generate_spec_types.pyNote on
validate.pyPer discussion on
dev@, added tovalidate.pyChecklist
Specification
core-spec/and follow the existing structureOntology
ontology/are consistent with spec changesConverters
converters/is updated to reflect spec or ontology changes.github/labeler.ymlis updated with the new pathValidation
validation/are updated if the spec changedDocumentation
docs/is updated to reflect any user-facing changesCONTRIBUTING.mdis updated if the contribution process changedExamples
examples/are added or updated for any new spec constructs or converter supportTests
pytest/ CI green)Compliance
NOTICEand/orLICENSEhave been updated per ASF policy