-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ppl-spark-extension optimzer support & mvn publish #56
Merged
vmmusings
merged 3 commits into
opensearch-project:main
from
YANG-DB:add_optimzer_support_and_mvn_publish
Oct 4, 2023
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Running PPL On Spark Reference Manual | ||
|
||
## Overview | ||
|
||
This module provides the support for running [PPL](https://github.com/opensearch-project/piped-processing-language) queries on Spark using direct logical plan | ||
translation between PPL's logical plan to Spark's Catalyst logical plan. | ||
|
||
### What is PPL ? | ||
OpenSearch PPL, or Pipe Processing Language, is a query language used with the OpenSearch platform and now Apache Spark. | ||
PPL allows users to retrieve, query, and analyze data by using commands that are piped together, making it easier to understand and compose complex queries. | ||
Its syntax is inspired by Unix pipes, which enables chaining of commands to transform and process data. | ||
With PPL, users can filter, aggregate, and visualize data in multiple datasources in a more intuitive manner compared to traditional query languages | ||
|
||
### Context | ||
|
||
The next concepts are the main purpose of introduction this functionality: | ||
- Transforming PPL to become OpenSearch default query language (specifically for logs/traces/metrics signals) | ||
- Promoting PPL as a viable candidate for the proposed CNCF Observability universal query language. | ||
- Seamlessly Interact with different datasources such as S3 / Prometheus / data-lake leveraging spark execution. | ||
- Using spark's federative capabilities as a general purpose query engine to facilitate complex queries including joins | ||
- Improve and promote PPL to become extensible and general purpose query language to be adopted by the community | ||
|
||
|
||
### Running PPL Commands: | ||
|
||
In order to run PPL commands, you will need to perform the following tasks: | ||
|
||
#### PPL Build & Run | ||
|
||
To build and run this PPL in Spark, you can run: | ||
|
||
``` | ||
sbt clean sparkPPLCosmetic/publishM2 | ||
``` | ||
then add org.opensearch:opensearch-spark_2.12 when run spark application, for example, | ||
``` | ||
bin/spark-shell --packages "org.opensearch:opensearch-spark-ppl_2.12:0.1.0-SNAPSHOT" | ||
``` | ||
|
||
### PPL Extension Usage | ||
|
||
To use PPL to Spark translation, you can run Spark with PPL extension: | ||
|
||
``` | ||
spark-sql --conf "spark.sql.extensions=org.opensearch.flint.FlintPPLSparkExtensions" | ||
``` | ||
|
||
### Running With both Flint & PPL Extensions | ||
In order to make use of both flint and ppl extension, one can simply add both jars (`org.opensearch:opensearch-spark-ppl_2.12:0.1.0-SNAPSHOT`,`org.opensearch:opensearch-spark_2.12:0.1.0-SNAPSHOT`) to the cluster's | ||
classpath. | ||
|
||
Next need to configure both extensions : | ||
``` | ||
spark-sql --conf "spark.sql.extensions='org.opensearch.flint.FlintPPLSparkExtensions, org.opensearch.flint.FlintSparkExtensions'" | ||
``` | ||
|
||
Once this is done, spark will allow both extensions to parse the query (SQL / PPL) and allow the correct execution of the query. | ||
In addition, PPL queries will enjoy the acceleration capabilities supported by the Flint plugins as described [here](index.md) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FlintSparkExtensions
is accessible to ppl module?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is used only in the
integ-test
project which is depended on both flint & ppl pluginsPPL module is not dependent on flint module