You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2021/07/15 07:51:00 UTC
[jira] [Assigned] (SPARK-36148) Missing validation of
regexp_replace inputs
[ https://issues.apache.org/jira/browse/SPARK-36148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Apache Spark reassigned SPARK-36148:
------------------------------------
Assignee: Apache Spark
> Missing validation of regexp_replace inputs
> -------------------------------------------
>
> Key: SPARK-36148
> URL: https://issues.apache.org/jira/browse/SPARK-36148
> Project: Spark
> Issue Type: Task
> Components: SQL
> Affects Versions: 3.3.0
> Reporter: Linhong Liu
> Assignee: Apache Spark
> Priority: Major
>
> sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/regexpExpressions.scala overrides checkInputDataTypes, but it doesn't call super.checkInputDataTypes, so basic type checking is disabled.
>
> {code:java}
> scala> spark.sql("""select regexp_replace(collect_list(1), "1", "2")""").collect()
> 221/07/14 20:58:38 ERROR CodeGenerator: failed to compile: org.codehaus.commons.compiler.CompileException: File 'generated.java', Line 72, Column 1: Assignment conversion not possible from type "org.apache.spark.sql.catalyst.util.ArrayData" to type "org.apache.spark.unsafe.types.UTF8String"
> 3org.codehaus.commons.compiler.CompileException: File 'generated.java', Line 72, Column 1: Assignment conversion not possible from type "org.apache.spark.sql.catalyst.util.ArrayData" to type "org.apache.spark.unsafe.types.UTF8String"
> 4 at org.codehaus.janino.UnitCompiler.compileError(UnitCompiler.java:12021)
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org