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
* default-main: (34 commits)
Enhance dynamic source clause to support only metadata filters (#4554)
Make nested alias type support referring to outer context (#4673)
Update big5 ppl queries and check plans (#4668)
Support push down sort after limit (#4657)
Use table scan rowType in filter pushdown could fix rename issue (#4670)
Fix: Support Alias Fields in MIN, MAX, FIRST, LAST, and TAKE Aggregations (#4621)
Fix bin nested fields issue (#4606)
Add `per_minute`, `per_hour`, `per_day` function support (#4531)
Pushdown sort aggregate metrics (#4603)
Followup: Change ComparableLinkedHashMap to compare Key than Value (#4648)
Mitigate the CI failure caused by 500 Internal Server Error (#4646)
Allow renaming group-by fields to existing field names (#4586)
Publish internal modules separately for downstream reuse (#4484)
Revert "Update grammar files and developer guide (#4301)" (#4643)
Support Automatic Type Conversion for REX/SPATH/PARSE Command Extractions (#4599)
Replace all dots in fields of table scan's PhysType (#4633)
Return comparable LinkedHashMap in `valueForCalcite()` of ExprTupleValue (#4629)
Refactor JsonExtractAllFunctionIT and MapConcatFunctionIT (#4623)
Pushdown case function in aggregations as range queries (#4400)
Update GEOIP function to support IP types as input (#4613)
...
Signed-off-by: Asif Bashar <[email protected]>
Copy file name to clipboardExpand all lines: DEVELOPER_GUIDE.rst
-27Lines changed: 0 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -173,7 +173,6 @@ Here are other files and sub-folders that you are likely to touch:
173
173
- ``build.gradle``: Gradle build script.
174
174
- ``docs``: documentation for developers and reference manual for users.
175
175
- ``doc-test``: code that run .rst docs in ``docs`` folder by Python doctest library.
176
-
- ``language-grammar``: centralized package for ANTLR grammar files. See `Language Grammar Package`_ for details.
177
176
178
177
Note that other related project code has already merged into this single repository together:
179
178
@@ -444,29 +443,3 @@ with an appropriate label `backport <backport-branch-name>` is merged to main wi
444
443
PR. For example, if a PR on main needs to be backported to `1.x` branch, add a label `backport 1.x` to the PR and make sure the
445
444
backport workflow runs on the PR along with other checks. Once this PR is merged to main, the workflow will create a backport PR
446
445
to the `1.x` branch.
447
-
448
-
Language Grammar Package
449
-
========================
450
-
451
-
The ``language-grammar`` package serves as a centralized repository for all ANTLR grammar files used throughout the OpenSearch SQL project. This package contains the definitive versions of grammar files for:
The language-grammar package enables sharing of grammar files between the main SQL repository and the Spark repository, ensuring consistency and reducing duplication. Once updated, the package automatically triggers CI to upload the new version to Maven Central for consumption by other projects.
462
-
463
-
Updating Grammar Files
464
-
----------------------
465
-
466
-
When grammar files are modified in their respective modules (``sql/``, ``ppl/``, ``legacy/``, ``async-query-core/``), they must be manually copied to the ``language-grammar/src/main/antlr4/`` directory.
467
-
468
-
**Workflow:**
469
-
470
-
1. Modify grammar files in their source locations (e.g., ``sql/src/main/antlr/``)
471
-
2. Copy updated files to ``language-grammar/src/main/antlr4/``
472
-
3. Commit changes to trigger automatic Maven publication via CI
This module provides a high-level integration layer for the Calcite-based query engine, enabling external systems such as Apache Spark or command-line tools to parse and analyze queries without exposing low-level internals.
4
+
5
+
## Overview
6
+
7
+
The `UnifiedQueryPlanner` serves as the primary entry point for external consumers. It accepts PPL (Piped Processing Language) queries and returns Calcite `RelNode` logical plans as intermediate representation.
8
+
9
+
## Usage
10
+
11
+
Use the declarative, fluent builder API to initialize the `UnifiedQueryPlanner`.
RelNode plan = planner.plan("source = opensearch.test");
22
+
```
23
+
24
+
## Development & Testing
25
+
26
+
A set of unit tests is provided to validate planner behavior.
27
+
28
+
To run tests:
29
+
30
+
```
31
+
./gradlew :api:test
32
+
```
33
+
34
+
## Integration Guide
35
+
36
+
This guide walks through how to integrate unified query planner into your application.
37
+
38
+
### Step 1: Add Dependency
39
+
40
+
The module is currently published as a snapshot to the AWS Sonatype Snapshots repository. To include it as a dependency in your project, add the following to your `pom.xml` or `build.gradle`:
41
+
42
+
```xml
43
+
<dependency>
44
+
<groupId>org.opensearch.query</groupId>
45
+
<artifactId>unified-query-api</artifactId>
46
+
<version>YOUR_VERSION_HERE</version>
47
+
</dependency>
48
+
```
49
+
50
+
### Step 2: Implement a Calcite Schema
51
+
52
+
You must implement the Calcite `Schema` interface and register them using the fluent `catalog()` method on the builder.
0 commit comments