What problem does it solve?
This Skill fills the gap for developers, data engineers, and DBAs working with DuckDB's LPTS extension by providing a single, comprehensive reference for the entire pipeline that transforms optimized logical query plans into equivalent CTE-based SQL strings, eliminating the need to parse source code to understand conversion logic, AST structures, and operator handling.
Core Features & Use Cases
- Full Pipeline Documentation: Covers all three phases of the LPTS pipeline: LogicalPlan to AST, AST to CTE List, and CTE List to SQL string, with function signatures and implementation details for each phase.
- Complete Structural References: Includes full hierarchies for AST nodes and CTE nodes, column binding map rules, and expression resolution logic for all supported expression types.
- Operator-Specific Conversion Guides: Details extraction and conversion logic for every supported logical operator (scans, filters, projections, aggregates, joins, unions, etc.) plus dialect-specific formatting differences for DuckDB, Postgres, and other supported SQL dialects.
- Use Case: A developer extending LPTS to support a new SQL dialect can use this reference to identify all dialect-specific formatting rules, while a data engineer debugging a transpiled query can trace how a specific logical filter operator is converted to a CTE WHERE clause.
Quick Start
Consult the explain-lpts skill to look up the AST node structure and conversion logic for a LOGICAL_COMPARISON_JOIN operator when implementing custom join handling for a new SQL dialect.