Skip to content

Conversation

@seankao-az
Copy link
Collaborator

@seankao-az seankao-az commented Apr 20, 2024

Description

Fix issue of no streaming job when CREATE MATERIALIZED VIEW statement ends with a semicolon.
Align parsing with upstream opensearch-spark repo:
https://github.com/opensearch-project/opensearch-spark/blob/b5ab7bd3ed135f1827df2cb0ca17422beb776985/flint-spark-integration/src/main/scala/org/opensearch/flint/spark/sql/FlintSparkSqlParser.scala#L58

Issues Resolved

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Sean Kao <seankao@amazon.com>
Signed-off-by: Sean Kao <seankao@amazon.com>
@seankao-az seankao-az self-assigned this Apr 20, 2024
@seankao-az seankao-az added bug Something isn't working backport 2.x labels Apr 20, 2024
@seankao-az seankao-az changed the title Fix semicolon parsing Fix semicolon parsing for async query Apr 20, 2024
YANG-DB
YANG-DB previously approved these changes Apr 20, 2024
Signed-off-by: Sean Kao <seankao@amazon.com>
Copy link
Collaborator

@noCharger noCharger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the change!

Copy link
Collaborator

@dai-chen dai-chen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

| DELETE FROM identifierReference tableAlias whereClause? #deleteFromTable
| UPDATE identifierReference tableAlias setClause whereClause? #updateTable
| MERGE INTO target=identifierReference targetAlias=tableAlias
| MERGE (WITH SCHEMA EVOLUTION)? INTO target=identifierReference targetAlias=tableAlias
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is latest changes from Spark 3.3.1 grammar?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

@seankao-az seankao-az merged commit 7f8fbe9 into opensearch-project:main Apr 22, 2024
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 22, 2024
* update sql grammar files from upstream

Signed-off-by: Sean Kao <seankao@amazon.com>

* resolve semicolon cause incorrect parsing

Signed-off-by: Sean Kao <seankao@amazon.com>

* spotlessApply

Signed-off-by: Sean Kao <seankao@amazon.com>

---------

Signed-off-by: Sean Kao <seankao@amazon.com>
(cherry picked from commit 7f8fbe9)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
vamsimanohar pushed a commit that referenced this pull request Apr 22, 2024
* update sql grammar files from upstream



* resolve semicolon cause incorrect parsing



* spotlessApply



---------


(cherry picked from commit 7f8fbe9)

Signed-off-by: Sean Kao <seankao@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 2.x bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants