Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
ca4d6c1
Doc enhancement for eventstats and bin command (#4117)
ahkcs Sep 4, 2025
9cd1f96
Implement `Append` command with Calcite (#4123)
songkant-aws Sep 5, 2025
945235a
`Bin` command big5 queries (#4163)
ahkcs Sep 5, 2025
ad54599
Don't recreate indices on every test (#4222)
Swiddis Sep 5, 2025
a1cb71f
Enable pushdown optimization for filtered aggregation (#4213)
dai-chen Sep 5, 2025
6586b72
Split up our test actions into unit, integ, and doctest. (#4193)
Swiddis Sep 5, 2025
c186686
[Feature] Core Implementation of `rex` Command In PPL (#4109)
RyanL1997 Sep 5, 2025
ab5f21a
Add wildcard support for rename command (#4019)
ritvibhatt Sep 8, 2025
f244bd6
Add support for `median(<value>)` (#4234)
aalva500-prog Sep 8, 2025
1e8b289
Dynamic source selector (#4116)
vamsimanohar Sep 9, 2025
e9cff8a
Add gitignore (#4258)
ykmr1224 Sep 9, 2025
d46cb4c
Support join field list and join options (#3803)
LantaoJin Sep 10, 2025
e232f6a
Support first/last aggregate functions for PPL (#4223)
ahkcs Sep 10, 2025
95a21b3
Fix gitignore to ignore symbolic link (#4263)
ykmr1224 Sep 10, 2025
3c614de
Push down limit operator into aggregation bucket size (#4228)
qianheng-aws Sep 10, 2025
71839f1
Fix the IT issue caused by merging conflict (#4270)
qianheng-aws Sep 10, 2025
fa3a12a
Print links to test logs after integTest (#4273)
ykmr1224 Sep 11, 2025
ab02d56
[Feature] Implementation of mode `sed` and `offset_field` in rex PPL …
RyanL1997 Sep 11, 2025
7de8545
Add earliest/latest aggregate function for eventstats PPL command (#4…
ykmr1224 Sep 11, 2025
0e2dc7c
Speed up aggregation pushdown for single group-by expression (#3550)
LantaoJin Sep 11, 2025
6d69440
Introduce YAML formatter for better testing/debugging (#4274)
ykmr1224 Sep 11, 2025
04a0633
doctest: Use 1.0 branch instead of main (#4219)
Swiddis Sep 12, 2025
c518022
Fix doctest (#4292)
Swiddis Sep 12, 2025
bd40af5
Search Command Revamp (#4152)
vamsimanohar Sep 15, 2025
cb51d8e
`mvjoin` support in PPL Caclite (#4217)
ps48 Sep 15, 2025
0af7429
strftime function implementation (#4106)
vamsimanohar Sep 15, 2025
7088e08
Add non-numeric field support for max/min functions (#4281)
ritvibhatt Sep 17, 2025
64a8671
Add `values` stats function with UDAF (#4276)
ps48 Sep 17, 2025
42c13b4
Support ISO8601-formatted string in PPL (#4246)
yuancu Sep 17, 2025
0e5802b
Push down project operator with non-identity projections into scan (#…
qianheng-aws Sep 17, 2025
f9cd7ee
Add spotless precommit hook + license check (#4306)
Swiddis Sep 17, 2025
cce492d
Add Ryan as a maintainer (#4257)
Swiddis Sep 17, 2025
2c873ef
Spotless precommit: apply instead of check (#4320)
Swiddis Sep 17, 2025
4b3b846
Add merge_group trigger to test workflows (#4216)
Swiddis Sep 17, 2025
00ea65e
Update grammar files and developer guide (#4301)
ahkcs Sep 17, 2025
d527bbd
Fix geopoiint issue in complex data types (#4325)
vamsimanohar Sep 18, 2025
37f024d
[Doc] Correct the comparision table for rex doc (#4321)
RyanL1997 Sep 18, 2025
38b4295
Add splunk to ppl cheat sheet (#3726)
penghuo Sep 18, 2025
2ab5002
Date/Time based Span aggregation should always not present null bucke…
LantaoJin Sep 19, 2025
517e881
Updating coalesce documentation (#4305)
aalva500-prog Sep 22, 2025
69a718b
Support serializing & deserializing UDTs when pushing down scripts (#…
yuancu Sep 23, 2025
c121fa8
change Anonymizer to mask PPL (#4352)
xinyual Sep 24, 2025
68d47cb
[Feature][Enhancement] Enhance patterns command with additional sampl…
songkant-aws Sep 24, 2025
8c417f4
Optimize count aggregation performance by utilizing native doc_count …
LantaoJin Sep 24, 2025
f2db121
No index found with given index pattern should throw IndexNotFoundExc…
LantaoJin Sep 24, 2025
5be225e
Push down stats with bins on time field into auto_date_histogram (#4329)
qianheng-aws Sep 24, 2025
40b7e1f
Merge remote-tracking branch 'origin/main' into merge-changes-from-main
lezzago Sep 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This should match the owning team set up in https://github.com/orgs/opensearch-project/teams
* @ps48 @kavithacm @derek-ho @joshuali925 @dai-chen @YANG-DB @mengweieric @vamsimanohar @swiddis @penghuo @seankao-az @MaxKsyunz @Yury-Fridlyand @anirudha @forestmvey @acarbonetto @GumpacG @ykmr1224 @LantaoJin @noCharger @qianheng-aws @yuancu
* @ps48 @kavithacm @derek-ho @joshuali925 @dai-chen @YANG-DB @mengweieric @vamsimanohar @swiddis @penghuo @seankao-az @MaxKsyunz @Yury-Fridlyand @anirudha @forestmvey @acarbonetto @GumpacG @ykmr1224 @LantaoJin @noCharger @qianheng-aws @yuancu @RyanL1997
1 change: 1 addition & 0 deletions .github/workflows/integ-tests-with-security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
paths:
- 'integ-test/**'
- '.github/workflows/integ-tests-with-security.yml'
merge_group:

jobs:
Get-CI-Image-Tag:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/sql-test-and-build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ on:
- '**/*.jar'
- '**/*.pom'
- '.github/workflows/sql-test-and-build-workflow.yml'
merge_group:

jobs:
Get-CI-Image-Tag:
Expand Down
13 changes: 13 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
repos:
- repo: local
hooks:
- id: spotless-format
name: Spotless Format
entry: bash -c './gradlew spotlessApply && git add -u'
language: system
pass_filenames: false
- id: spotless-check
name: Spotless Post-format Check
entry: bash -c './gradlew spotlessCheck'
language: system
pass_filenames: false
27 changes: 27 additions & 0 deletions DEVELOPER_GUIDE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ Here are other files and sub-folders that you are likely to touch:
- ``build.gradle``: Gradle build script.
- ``docs``: documentation for developers and reference manual for users.
- ``doc-test``: code that run .rst docs in ``docs`` folder by Python doctest library.
- ``language-grammar``: centralized package for ANTLR grammar files. See `Language Grammar Package`_ for details.

Note that other related project code has already merged into this single repository together:

Expand Down Expand Up @@ -441,3 +442,29 @@ with an appropriate label `backport <backport-branch-name>` is merged to main wi
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
backport workflow runs on the PR along with other checks. Once this PR is merged to main, the workflow will create a backport PR
to the `1.x` branch.

Language Grammar Package
========================

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:

- SQL parsing (``OpenSearchSQLParser.g4``, ``OpenSearchSQLLexer.g4``)
- PPL parsing (``OpenSearchPPLParser.g4``, ``OpenSearchPPLLexer.g4``)
- Legacy SQL parsing (``OpenSearchLegacySqlParser.g4``, ``OpenSearchLegacySqlLexer.g4``)
- Spark SQL extensions (``SparkSqlBase.g4``, ``FlintSparkSqlExtensions.g4``, ``SqlBaseParser.g4``, ``SqlBaseLexer.g4``)

Purpose
-------

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.

Updating Grammar Files
----------------------

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.

**Workflow:**

1. Modify grammar files in their source locations (e.g., ``sql/src/main/antlr/``)
2. Copy updated files to ``language-grammar/src/main/antlr4/``
3. Commit changes to trigger automatic Maven publication via CI
3 changes: 2 additions & 1 deletion MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This document contains a list of maintainers in this repo. See [opensearch-proje
## Current Maintainers

| Maintainer | GitHub ID | Affiliation |
|-------------------|-----------------------------------------------------| ----------- |
|-------------------|-----------------------------------------------------|-------------|
| Eric Wei | [mengweieric](https://github.com/mengweieric) | Amazon |
| Joshua Li | [joshuali925](https://github.com/joshuali925) | Amazon |
| Shenoy Pratik | [ps48](https://github.com/ps48) | Amazon |
Expand All @@ -23,6 +23,7 @@ This document contains a list of maintainers in this repo. See [opensearch-proje
| Louis Chu | [noCharger](https://github.com/noCharger) | Amazon |
| Heng Qian | [qianheng-aws](https://github.com/qianheng-aws) | Amazon |
| Yuanchun Shen | [yuancu](https://github.com/yuancu) | Amazon |
| Ryan Liang | [RyanL1997](https://github.com/RyanL1997) | Amazon |
| Max Ksyunz | [MaxKsyunz](https://github.com/MaxKsyunz) | Improving |
| Yury Fridlyand | [Yury-Fridlyand](https://github.com/Yury-Fridlyand) | Improving |
| Andrew Carbonetto | [acarbonetto](https://github.com/acarbonetto) | Improving |
Expand Down
2 changes: 1 addition & 1 deletion async-query-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
id "io.freefair.lombok"
id 'jacoco'
id 'antlr'
id 'com.diffplug.spotless' version '6.22.0'
id 'com.diffplug.spotless'
id 'com.gradleup.shadow'
}

Expand Down
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ plugins {
id 'java-library'
id "io.freefair.lombok" version "8.14"
id 'jacoco'
id 'com.diffplug.spotless' version '6.22.0'
id 'com.diffplug.spotless' version '7.2.1'
}

// import versions defined in https://github.com/opensearch-project/OpenSearch/blob/main/buildSrc/src/main/java/org/opensearch/gradle/OpenSearchJavaPlugin.java#L94
Expand All @@ -105,10 +105,10 @@ spotless {
exclude '**/build/**', '**/build-*/**', '**/gen/**'
}
importOrder()
// licenseHeader("/*\n" +
// " * Copyright OpenSearch Contributors\n" +
// " * SPDX-License-Identifier: Apache-2.0\n" +
// " */\n\n")
licenseHeader("/*\n" +
" * Copyright OpenSearch Contributors\n" +
" * SPDX-License-Identifier: Apache-2.0\n" +
" */\n\n")
removeUnusedImports()
trimTrailingWhitespace()
endWithNewline()
Expand Down
11 changes: 5 additions & 6 deletions common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
plugins {
id 'java-library'
id "io.freefair.lombok"
id 'com.diffplug.spotless' version '6.22.0'
id 'com.diffplug.spotless'
}

repositories {
Expand Down Expand Up @@ -73,11 +73,10 @@ spotless {
exclude '**/build/**', '**/build-*/**'
}
importOrder()
// Needs https://github.com/opensearch-project/sql/issues/1893 to be addressed first
// licenseHeader("/*\n" +
// " * Copyright OpenSearch Contributors\n" +
// " * SPDX-License-Identifier: Apache-2.0\n" +
// " */\n\n")
licenseHeader("/*\n" +
" * Copyright OpenSearch Contributors\n" +
" * SPDX-License-Identifier: Apache-2.0\n" +
" */\n\n")
removeUnusedImports()
trimTrailingWhitespace()
endWithNewline()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.sql.common.antlr;

import org.antlr.v4.runtime.tree.ParseTree;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
/*
*
* * Copyright OpenSearch Contributors
* * SPDX-License-Identifier: Apache-2.0
*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.sql.common.interceptors;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
/*
*
* * Copyright OpenSearch Contributors
* * SPDX-License-Identifier: Apache-2.0
*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.sql.common.interceptors;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
/*
*
* * Copyright OpenSearch Contributors
* * SPDX-License-Identifier: Apache-2.0
*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.sql.common.interceptors;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public enum Key {
PATTERN_MAX_SAMPLE_COUNT("plugins.ppl.pattern.max.sample.count"),
PATTERN_BUFFER_LIMIT("plugins.ppl.pattern.buffer.limit"),
PPL_REX_MAX_MATCH_LIMIT("plugins.ppl.rex.max_match.limit"),
PPL_VALUES_MAX_LIMIT("plugins.ppl.values.max.limit"),
PPL_SYNTAX_LEGACY_PREFERRED("plugins.ppl.syntax.legacy.preferred"),

/** Enable Calcite as execution engine */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.sql.common.utils;

import inet.ipaddr.IPAddressString;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
/*
*
* * Copyright OpenSearch Contributors
* * SPDX-License-Identifier: Apache-2.0
*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.sql.common.interceptors;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
/*
*
* * Copyright OpenSearch Contributors
* * SPDX-License-Identifier: Apache-2.0
*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.sql.common.interceptors;
Expand Down
11 changes: 6 additions & 5 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ plugins {
id 'jacoco'
id 'info.solidsoft.pitest' version '1.9.0'
id 'java-test-fixtures'
id 'com.diffplug.spotless' version '6.22.0'
id 'com.diffplug.spotless'

}

Expand Down Expand Up @@ -83,10 +83,11 @@ spotless {
exclude '**/build/**', '**/build-*/**'
}
importOrder()
// licenseHeader("/*\n" +
// " * Copyright OpenSearch Contributors\n" +
// " * SPDX-License-Identifier: Apache-2.0\n" +
// " */\n\n")
licenseHeader("/*\n" +
" * Copyright OpenSearch Contributors\n" +
" * SPDX-License-Identifier: Apache-2.0\n" +
" */\n\n")
.onlyIfContentMatches("^((?!\\(original license below\\))[\\s\\S])*\$")
removeUnusedImports()
trimTrailingWhitespace()
endWithNewline()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
/*
*
* * Copyright OpenSearch Contributors
* * SPDX-License-Identifier: Apache-2.0
*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.sql;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
/*
*
* * Copyright OpenSearch Contributors
* * SPDX-License-Identifier: Apache-2.0
*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.sql.analysis;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*/

package org.opensearch.sql.ast.expression;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ public enum SpanUnit {
SPAN_UNITS = builder.add(SpanUnit.values()).build();
}

/** Util method to check if the unit is time unit. */
public static boolean isTimeUnit(SpanUnit unit) {
return unit != UNKNOWN && unit != NONE;
}

/** Util method to get span unit given the unit name. */
public static SpanUnit of(String unit) {
switch (unit) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*/

package org.opensearch.sql.ast.statement;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*/

package org.opensearch.sql.ast.statement;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*/

package org.opensearch.sql.ast.statement;
Expand Down
Loading
Loading