-
Notifications
You must be signed in to change notification settings - Fork 447
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eb67ee7
commit 1379afd
Showing
12 changed files
with
270 additions
and
78 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
gluten-delta/src/main/delta-20/org/apache/gluten/execution/DeltaProjectExecTransformer.scala
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,27 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.apache.gluten.execution | ||
|
||
import org.apache.spark.sql.catalyst.expressions.NamedExpression | ||
import org.apache.spark.sql.execution.SparkPlan | ||
|
||
case class DeltaProjectExecTransformer(projectList: Seq[NamedExpression], child: SparkPlan) | ||
extends ProjectExecTransformerBase(projectList, child) { | ||
|
||
override protected def withNewChildInternal(newChild: SparkPlan): DeltaProjectExecTransformer = | ||
copy(child = newChild) | ||
} |
27 changes: 27 additions & 0 deletions
27
gluten-delta/src/main/delta-23/org/apache/gluten/execution/DeltaProjectExecTransformer.scala
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,27 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.apache.gluten.execution | ||
|
||
import org.apache.spark.sql.catalyst.expressions.NamedExpression | ||
import org.apache.spark.sql.execution.SparkPlan | ||
|
||
case class DeltaProjectExecTransformer(projectList: Seq[NamedExpression], child: SparkPlan) | ||
extends ProjectExecTransformerBase(projectList, child) { | ||
|
||
override protected def withNewChildInternal(newChild: SparkPlan): DeltaProjectExecTransformer = | ||
copy(child = newChild) | ||
} |
27 changes: 27 additions & 0 deletions
27
gluten-delta/src/main/delta-24/org/apache/gluten/execution/DeltaProjectExecTransformer.scala
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,27 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.apache.gluten.execution | ||
|
||
import org.apache.spark.sql.catalyst.expressions.NamedExpression | ||
import org.apache.spark.sql.execution.SparkPlan | ||
|
||
case class DeltaProjectExecTransformer(projectList: Seq[NamedExpression], child: SparkPlan) | ||
extends ProjectExecTransformerBase(projectList, child) { | ||
|
||
override protected def withNewChildInternal(newChild: SparkPlan): DeltaProjectExecTransformer = | ||
copy(child = newChild) | ||
} |
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
1 change: 1 addition & 0 deletions
1
...rc/main/resources/META-INF/services/org.apache.gluten.execution.FilterTransformerRegister
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 @@ | ||
org.apache.gluten.execution.DeltaFilterTransformerProvider |
1 change: 1 addition & 0 deletions
1
...c/main/resources/META-INF/services/org.apache.gluten.execution.ProjectTransformerRegister
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 @@ | ||
org.apache.gluten.execution.DeltaProjectTransformerProvider |
28 changes: 28 additions & 0 deletions
28
...en-delta/src/main/scala/org/apache/gluten/execution/DeltaProjectTransformerProvider.scala
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,28 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.apache.gluten.execution | ||
|
||
import org.apache.spark.sql.execution.ProjectExec | ||
|
||
class DeltaProjectTransformerProvider extends ProjectTransformerRegister { | ||
|
||
override val dataLakeClass: String = "delta" | ||
|
||
override def createProjectTransformer(projectExec: ProjectExec): ProjectExecTransformerBase = { | ||
DeltaProjectExecTransformer(projectExec.projectList, projectExec.child) | ||
} | ||
} |
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
35 changes: 35 additions & 0 deletions
35
gluten-substrait/src/main/scala/org/apache/gluten/execution/ProjectExecTransformer.scala
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,35 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.apache.gluten.execution | ||
|
||
import org.apache.spark.sql.catalyst.expressions.NamedExpression | ||
import org.apache.spark.sql.execution.SparkPlan | ||
|
||
case class ProjectExecTransformer(projectList: Seq[NamedExpression], child: SparkPlan) | ||
extends ProjectExecTransformerBase(projectList, child) { | ||
|
||
override protected def withNewChildInternal(newChild: SparkPlan): ProjectExecTransformer = | ||
copy(child = newChild) | ||
} | ||
|
||
object ProjectExecTransformer { | ||
|
||
// Directly creating a project transformer may not be considered safe since some backends, E.g., | ||
// Clickhouse may require to intercept the instantiation procedure. | ||
def createUnsafe(projectList: Seq[NamedExpression], child: SparkPlan): ProjectExecTransformer = | ||
new ProjectExecTransformer(projectList, child) | ||
} |
Oops, something went wrong.