You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: api/README.md
+17-5Lines changed: 17 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ This module provides components organized into two main areas aligned with the [
8
8
9
9
### Unified Language Specification
10
10
11
-
-**`UnifiedQueryPlanner`**: Accepts PPL (Piped Processing Language) queries and returns Calcite `RelNode` logical plans as intermediate representation.
11
+
-**`UnifiedQueryPlanner`**: Accepts PPL (Piped Processing Language) or ANSI SQL queries and returns Calcite `RelNode` logical plans as intermediate representation. PPL uses the ANTLR-based parser while SQL uses Calcite's native `SqlParser` → `SqlValidator` → `SqlToRelConverter` pipeline.
12
12
-**`UnifiedQueryTranspiler`**: Converts Calcite logical plans (`RelNode`) into SQL strings for various target databases using different SQL dialects.
13
13
14
14
### Unified Execution Runtime
@@ -17,7 +17,7 @@ This module provides components organized into two main areas aligned with the [
17
17
-**`UnifiedFunction`**: Engine-agnostic function interface that enables functions to be evaluated across different execution engines without engine-specific code duplication.
18
18
-**`UnifiedFunctionRepository`**: Repository for discovering and loading functions as `UnifiedFunction` instances, providing a bridge between function definitions and external execution engines.
19
19
20
-
Together, these components enable complete workflows: parse PPL queries into logical plans, transpile those plans into target database SQL, compile and execute queries directly, or export PPL functions for use in external execution engines.
20
+
Together, these components enable complete workflows: parse PPL or SQL queries into logical plans, transpile those plans into target database SQL, compile and execute queries directly, or export PPL functions for use in external execution engines.
Use `UnifiedQueryPlanner` to parse and analyze PPL queries into Calcite logical plans. The planner accepts a `UnifiedQueryContext` and can be reused for multiple queries.
47
+
Use `UnifiedQueryPlanner` to parse and analyze PPL or SQL queries into Calcite logical plans. The planner accepts a `UnifiedQueryContext` and can be reused for multiple queries.
RelNode plan = sqlPlanner.plan("SELECT * FROM employees WHERE age > 30");
69
+
```
70
+
58
71
### UnifiedQueryTranspiler
59
72
60
73
Use `UnifiedQueryTranspiler` to convert Calcite logical plans into SQL strings for target databases. The transpiler supports various SQL dialects through Calcite's `SqlDialect` interface.
@@ -226,5 +239,4 @@ public class MySchema extends AbstractSchema {
226
239
227
240
## Future Work
228
241
229
-
- Expand support to SQL language.
230
242
- Extend planner to generate optimized physical plans using Calcite's optimization frameworks.
0 commit comments