explain-lpts
OfficialReference for LPTS logical plan to SQL conversion
System Documentation
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.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: explain-lpts Download link: https://github.com/cwida/lpts/archive/main.zip#explain-lpts Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 536,000+ vetted skills library on demand.