Skip to content

[FEATURE] Add unified query API for PPL → SQL transpilation #4870

@dai-chen

Description

@dai-chen

Is your feature request related to a problem?

Yes. There is currently no standard way to transpile OpenSearch PPL (Piped Processing Language) queries into SQL dialects for different backends. Users who want to integrate PPL with external systems (e.g., Apache Spark, Presto) have no reusable API to convert PPL into backend-specific SQL.

In practice, the main use case is either to:

  1. Transpile a PPL query into an equivalent SQL query and forward it entirely to another engine, or to;
  2. Embed the unified query library inside another engine to provide native PPL support there.

What solution would you like?

Following the existing Unified Query API design (e.g., UnifiedQueryPlanner introduced in #3783), add a new Unified Query Transpiler API that consists converts Calcite logical plans into SQL strings for various target databases using SQL dialects.

What alternatives have you considered?

With no unified transpiler, each engine must call Calcite directly, duplicating effort and exposing the complexity of Calcite’s internals.

Do you have any additional context?

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Status

New

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions