-
Notifications
You must be signed in to change notification settings - Fork 39
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 Support for PythonUDAF expression #937
base: dev
Are you sure you want to change the base?
Changes from all commits
6d651b6
cadb525
f9701a1
d70668a
297c7ad
8a9fec9
e542bf3
cfae1a8
948a344
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright (c) 2024, NVIDIA CORPORATION. | ||
* | ||
* Licensed 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 com.nvidia.spark.rapids.tool.planparser | ||
|
||
import com.nvidia.spark.rapids.tool.qualification.PluginTypeChecker | ||
|
||
import org.apache.spark.internal.Logging | ||
import org.apache.spark.sql.execution.ui.SparkPlanGraphNode | ||
|
||
case class BatchEvalPythonExecParser( | ||
node: SparkPlanGraphNode, | ||
checker: PluginTypeChecker, | ||
sqlID: Long) extends ExecParser with Logging { | ||
|
||
val fullExecName = node.name + "Exec" | ||
|
||
override def parse: ExecInfo = { | ||
val duration = None | ||
// TODO - add in parsing expressions - average speedup across? | ||
ExecInfo(node, sqlID, node.name, "", 1.0, duration, node.id, true, None) | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -357,7 +357,11 @@ object RDDCheckHelper { | |
|
||
object ExecHelper { | ||
private val UDFRegExLookup = Set( | ||
".*UDF.*".r | ||
".*(?<!python)UDF.*".r | ||
) | ||
|
||
private val pythonUDFRegExLookUp = Set( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here as my previous comment. There are three regular expressions that look overlapping. |
||
".*pythonUDF.*".r | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This does not take |
||
) | ||
|
||
// we don't want to mark the *InPandas and ArrowEvalPythonExec as unsupported with UDF | ||
|
@@ -385,6 +389,10 @@ object ExecHelper { | |
} | ||
} | ||
|
||
def isPythonUDF(node: SparkPlanGraphNode): Boolean = { | ||
pythonUDFRegExLookUp.exists(regEx => node.desc.matches(regEx.regex)) | ||
} | ||
|
||
def shouldBeRemoved(nodeName: String): Boolean = { | ||
execsToBeRemoved.contains(nodeName) | ||
} | ||
|
Large diffs are not rendered by default.
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 won't match
pythonUDAF