Skip to content

Fix additional transpiler issues found during audit#127

Open
EDsCODE wants to merge 1 commit intomainfrom
fix/transpiler-audit-additional-issues
Open

Fix additional transpiler issues found during audit#127
EDsCODE wants to merge 1 commit intomainfrom
fix/transpiler-audit-additional-issues

Conversation

@EDsCODE
Copy link
Contributor

@EDsCODE EDsCODE commented Feb 3, 2026

Summary

Comprehensive audit of the transpiler revealed additional issues similar to #126:

Issues Found & Fixed

1. InformationSchemaTransform missing ColumnRef handling

Same bug pattern as #126. When information_schema.columns is rewritten to information_schema_columns_compat, column references like columns.column_name were not being updated.

-- Before: columns.column_name not rewritten
SELECT columns.column_name FROM memory.main.information_schema_columns_compat

-- After: properly rewritten
SELECT information_schema_columns_compat.column_name FROM memory.main.information_schema_columns_compat

2. TypeCastTransform missing type mappings

The following types with pg_catalog. prefix were not handled:

Type Mapping Notes
decimal decimal Strip prefix only
boolean boolean Strip prefix only
date date Strip prefix only
uuid uuid Strip prefix only
bit bit Strip prefix only
xml varchar Convert (DuckDB doesn't support XML)
varbit varchar Convert
name varchar Convert (PostgreSQL internal type)
oid integer Convert

3. PgCatalogTransform ColumnRef handling

Same fix as #126, included here since this branch is based on main.

Test plan

  • Added 4 test cases for information_schema column reference rewriting
  • Added 9 test cases for pg_catalog type prefix handling
  • All existing tests pass

🤖 Generated with Claude Code

Comprehensive audit revealed additional issues similar to #126:

1. InformationSchemaTransform missing ColumnRef handling
   - Column refs like columns.column_name not rewritten when table renamed
   - Added Node_ColumnRef case to rewrite qualified column references

2. PgCatalogTransform missing ColumnRef handling (same as #126)
   - Included here for completeness as this branch is based on main

3. TypeCastTransform missing type mappings for common PostgreSQL types
   - decimal, boolean, date, uuid, bit -> keep same, strip pg_catalog prefix
   - xml, varbit, name -> convert to varchar
   - oid -> convert to integer

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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