forked from opensearch-project/opensearch-spark
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: YANGDB <[email protected]>
- Loading branch information
Showing
7 changed files
with
156 additions
and
18 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
ppl-spark-integration/src/main/java/org/opensearch/sql/ast/expression/FieldsMapping.java
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,20 @@ | ||
package org.opensearch.sql.ast.expression; | ||
|
||
import org.opensearch.sql.ast.AbstractNodeVisitor; | ||
|
||
import java.util.List; | ||
|
||
public class FieldsMapping extends UnresolvedExpression { | ||
|
||
|
||
private final List<UnresolvedExpression> fieldsMappingList; | ||
|
||
public <R> FieldsMapping(List<UnresolvedExpression> fieldsMappingList) { | ||
this.fieldsMappingList = fieldsMappingList; | ||
} | ||
|
||
@Override | ||
public <R, C> R accept(AbstractNodeVisitor<R, C> nodeVisitor, C context) { | ||
return nodeVisitor.visit(this, context); | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
ppl-spark-integration/src/main/java/org/opensearch/sql/ast/expression/Scope.java
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,9 @@ | ||
package org.opensearch.sql.ast.expression; | ||
|
||
/** Scope expression node. Params include field expression and the scope value. */ | ||
public class Scope extends Span { | ||
public Scope(UnresolvedExpression field, UnresolvedExpression value, SpanUnit unit) { | ||
super(field, value, unit); | ||
} | ||
|
||
} |
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
14 changes: 14 additions & 0 deletions
14
ppl-spark-integration/src/main/java/org/opensearch/sql/ppl/utils/JoinSpecTransformer.java
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,14 @@ | ||
package org.opensearch.sql.ppl.utils; | ||
|
||
import org.apache.spark.sql.catalyst.expressions.Expression; | ||
import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan; | ||
import org.opensearch.sql.ast.tree.Correlation; | ||
import scala.collection.Seq; | ||
|
||
public interface JoinSpecTransformer { | ||
|
||
static LogicalPlan join(Correlation.CorrelationType correlationType, Seq<Expression> fields, Expression valueExpression, Seq<Expression> mapping, LogicalPlan p) { | ||
//create a join statement | ||
return p; | ||
} | ||
} |
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