Skip to content

[Postgres Support 5/5] Python ch_sink_tools Package#1269

Open
minguyen9988 wants to merge 1 commit into2.9.1from
minguyen/postgres-pr5-python-ch-sink-tools
Open

[Postgres Support 5/5] Python ch_sink_tools Package#1269
minguyen9988 wants to merge 1 commit into2.9.1from
minguyen/postgres-pr5-python-ch-sink-tools

Conversation

@minguyen9988
Copy link
Copy Markdown
Collaborator

Summary

Restructures the Python tooling into a proper ch_sink_tools package with ANTLR-generated PostgreSQL parsers, database comparison utilities, schema dumping, and data loading tools.

Part 5 of 5 PRs split from #1245 for reviewability.

Changes

  • Package restructure: Reorganized from flat db/, db_compare/, db_dump/, db_load/ directories into proper ch_sink_tools Python package with submodules
  • ANTLR PostgreSQL grammar: Added PostgreSQL SQL grammar files and generated Python parser/lexer
  • PostgreSQL support: db/postgres.py for PostgreSQL connections, postgres_type_mapper.py for type mapping, postgres_dumper.py for schema dumping
  • Build tooling: pyproject.toml for modern Python packaging, build_wheel.sh for wheel builds
  • Config system: column_type_overrides.py and override_reconciler.py for column type override configuration
  • Database comparison: Updated db_compare module for PostgreSQL↔ClickHouse comparison
  • Tests: test_naming.py for naming utility tests

Files (66 files, +106,547/−110)

  • 37 new files (ANTLR grammars, generated parsers, new modules)
  • 21 renamed files (package restructure)
  • 4 modified files (README, build scripts, requirements)
  • 4 deleted files (old init.py files)

Review Notes

  • Independent of Java PRs (1-4) — can be reviewed and merged separately
  • Large line count is primarily from ANTLR-generated parser files
  • The package restructure (renames) makes this a clean break from the old flat structure

@minguyen9988 minguyen9988 force-pushed the minguyen/postgres-pr5-python-ch-sink-tools branch from a52ef6e to 843217c Compare March 16, 2026 05:44
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.

1 participant