Skip to content

Conversation

@bobbai00
Copy link
Contributor

@bobbai00 bobbai00 commented Oct 4, 2025

Summary

This PR eliminates the duplication of SQL DDL files between core/scripts/sql/ and deployment/k8s/texera-helmchart/files/ by replacing duplicate files with symlinks.

Changes

  • Replaced the duplicate texera_ddl.sql in the Helm chart directory with symlinks to the core SQL files
  • Created symlinks for all three SQL initialization files:
    • texera_lakefs.sql../../../../core/scripts/sql/texera_lakefs.sql
    • iceberg_postgres_catalog.sql../../../../core/scripts/sql/iceberg_postgres_catalog.sql
    • texera_ddl.sql../../../../core/scripts/sql/texera_ddl.sql
  • Updated the Helm chart ConfigMap to properly reference and execute these symlinked files in the correct order

Benefits

  • Single source of truth: All SQL DDL files are maintained only in core/scripts/sql/
  • No duplication: Eliminates maintenance burden of keeping two copies in sync
  • Automatic updates: Any changes to core SQL files automatically reflect in Helm deployments
  • Clean structure: Files maintain their original, descriptive names

Fixes #3823

- Replace duplicate texera_ddl.sql in Helm chart with symlinks to core SQL files
- Create symlinks for all three SQL files: texera_lakefs.sql, iceberg_postgres_catalog.sql, and texera_ddl.sql
- Update ConfigMap to execute SQL files in correct order
- Maintains single source of truth in core/scripts/sql/

This eliminates duplication and ensures consistency across deployments.

Fixes apache#3823

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions bot added ddl-change Changes to the TexeraDB DDL fix build labels Oct 4, 2025
@bobbai00 bobbai00 removed the ddl-change Changes to the TexeraDB DDL label Oct 4, 2025
@bobbai00 bobbai00 changed the title fix: deduplicate SQL DDL files by using symlinks fix(deployment): deduplicate SQL files under deployment by using symlinks Oct 4, 2025
@bobbai00 bobbai00 self-assigned this Oct 4, 2025
@bobbai00 bobbai00 requested a review from aglinxinyuan October 4, 2025 19:00
Copy link
Contributor

@aglinxinyuan aglinxinyuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the test case by adding the other two DDL files to github-action-build.yml as well, since you changed the content of texera_ddl.sql.

@github-actions github-actions bot added ddl-change Changes to the TexeraDB DDL ci changes related to CI labels Oct 6, 2025
Copy link
Contributor

@aglinxinyuan aglinxinyuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@aglinxinyuan aglinxinyuan enabled auto-merge (squash) October 7, 2025 21:29
@aglinxinyuan aglinxinyuan merged commit 62dd9d4 into apache:main Oct 7, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build ci changes related to CI ddl-change Changes to the TexeraDB DDL fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Duplicate ddl files

2 participants