-
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
Use parse_url kernel for QUERY parsing #10061
Conversation
Signed-off-by: Haoyang Li <[email protected]>
build |
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.
Sorry I did some manual testing and this falls over badly if I include the third parameter for query.
spark.time(spark.range(0, 300000000L, 1, 24).selectExpr("CONCAT('http://a.com?foo=', CAST(id AS STRING)) as h").selectExpr("SUM(length(parse_url(h, 'QUERY', 'foo'))) as q").show())
Caused by: java.lang.UnsupportedOperationException: parse_url(input[0, string, false](h#340), QUERY, foo) is not supported partToExtract=QUERY. Only PROTOCOL and HOST are supported
at org.apache.spark.sql.rapids.GpuParseUrl.doColumnar(GpuParseUrl.scala:85)
at org.apache.spark.sql.rapids.GpuParseUrl.$anonfun$columnarEval$5(GpuParseUrl.scala:111)
at com.nvidia.spark.rapids.Arm$.withResourceIfAllowed(Arm.scala:74)
at org.apache.spark.sql.rapids.GpuParseUrl.$anonfun$columnarEval$4(GpuParseUrl.scala:108)
at com.nvidia.spark.rapids.Arm$.withResourceIfAllowed(Arm.scala:74)
at org.apache.spark.sql.rapids.GpuParseUrl.$anonfun$columnarEval$3(GpuParseUrl.scala:107)
at com.nvidia.spark.rapids.Arm$.withResourceIfAllowed(Arm.scala:74)
Can we please add tests that verify that we fall back to the CPU if we see the extra parameter for 'QUERY'?
Signed-off-by: Haoyang Li <[email protected]>
Done, thanks! |
build |
This PR adds plugin support for QUERY parsing in parse_url (returning the entire query).
Contributes to #8963
Depends on: NVIDIA/spark-rapids-jni#1652
All cases from the kaggle dataset passed.
Perf test results
dataset: kaggle dataset repeated 10 times.