-
Notifications
You must be signed in to change notification settings - Fork 237
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
Enable regular expressions on GPU by default [databricks] #4740
Conversation
Signed-off-by: Andy Grove <andygrove@nvidia.com>
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.
Just a nit on the doc comments. Also the check appears to be the same everywhere and it might be nice to have common code for it, but that is really minor.
@@ -351,14 +351,12 @@ abstract class Spark30XdbShims extends Spark30XdbShimsBase with Logging { | |||
override def convertToGpu(child: Expression): GpuExpression = GpuAbs(child, false) | |||
}), | |||
GpuOverrides.expr[RegExpReplace]( | |||
"RegExpReplace support for string literal input patterns", | |||
"RegExpReplace", |
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.
I personally would rather have a description of what this does and not the name of it again.
"String replace using a regular expression"
@@ -297,14 +297,12 @@ abstract class Spark30XShims extends Spark301until320Shims with Logging { | |||
override def convertToGpu(child: Expression): GpuExpression = GpuAbs(child, false) | |||
}), | |||
GpuOverrides.expr[RegExpReplace]( | |||
"RegExpReplace support for string literal input patterns", | |||
"RegExpReplace", |
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.
same here
@@ -207,17 +207,15 @@ abstract class Spark31XShims extends Spark301until320Shims with Logging { | |||
override def convertToGpu(child: Expression): GpuExpression = GpuAbs(child, false) | |||
}), | |||
GpuOverrides.expr[RegExpReplace]( | |||
"RegExpReplace support for string literal input patterns", | |||
"RegExpReplace", |
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.
and here
@@ -206,17 +206,15 @@ abstract class Spark31XdbShims extends Spark31XdbShimsBase with Logging { | |||
override def convertToGpu(child: Expression): GpuExpression = GpuAbs(child, false) | |||
}), | |||
GpuOverrides.expr[RegExpReplace]( | |||
"RegExpReplace support for string literal input patterns", | |||
"RegExpReplace", |
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.
and here
@@ -309,7 +309,7 @@ trait Spark320PlusShims extends SparkShims with RebaseShims with Logging { | |||
override def convertToGpu(child: Expression): GpuExpression = GpuAbs(child, ansiEnabled) | |||
}), | |||
GpuOverrides.expr[RegExpReplace]( | |||
"RegExpReplace support for string literal input patterns", | |||
"RegExpReplace", |
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.
and here too
sql-plugin/src/main/scala/com/nvidia/spark/rapids/RapidsConf.scala
Outdated
Show resolved
Hide resolved
sql-plugin/src/main/301db/scala/com/nvidia/spark/rapids/shims/v2/GpuRegExpReplaceExec.scala
Outdated
Show resolved
Hide resolved
...src/main/301until310-nondb/scala/com/nvidia/spark/rapids/shims/v2/GpuRegExpReplaceMeta.scala
Outdated
Show resolved
Hide resolved
sql-plugin/src/main/301db/scala/com/nvidia/spark/rapids/shims/v2/GpuRegExpReplaceExec.scala
Outdated
Show resolved
Hide resolved
…cala Co-authored-by: Jason Lowe <jlowe@nvidia.com>
sql-plugin/src/main/scala/org/apache/spark/sql/rapids/stringFunctions.scala
Outdated
Show resolved
Hide resolved
…nctions.scala Co-authored-by: Jason Lowe <jlowe@nvidia.com>
build |
Signed-off-by: Andy Grove andygrove@nvidia.com
This PR adds a new config option
spark.rapids.sql.regexp.enabled
which defaults totrue
and enables all existing regular expression support on GPU, such asRLike
,RegExp
,RegExpReplace
, andRegExpExtract
. This replaces the previous approach of disabling individual expression classes by default.