[
https://issues.apache.org/jira/browse/SPARK-52148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Allison Wang updated SPARK-52148:
---------------------------------
Description:
– !query
CREATE FUNCTION foo3_3at(x INT) RETURNS TABLE (a DOUBLE) RETURN SELECT 1 / x;
– !query schema
struct<>
– !query output
– !query
CREATE OR REPLACE FUNCTION foo3_3at(x INT) RETURNS TABLE (a DOUBLE) RETURN
SELECT 1 / x
– !query schema
struct<>
– !query output
org.apache.spark.sql.catalyst.analysis.FunctionAlreadyExistsException
{
"errorClass" : "ROUTINE_ALREADY_EXISTS",
"sqlState" : "42723",
"messageParameters" :
{ "existingRoutineType" : "routine", "newRoutineType" : "routine",
"routineName" : "`default`.`foo3_3at`" }
}
was:
-- !query
CREATE OR REPLACE FUNCTION foo3_3a(x INT) RETURNS DOUBLE RETURN 1 / x
-- !query schema
struct<>
-- !query output
-- !query
CREATE OR REPLACE FUNCTION foo3_3at(x INT) RETURNS TABLE (a DOUBLE) RETURN
SELECT 1 / x
-- !query schema
struct<>
-- !query output
org.apache.spark.sql.catalyst.analysis.FunctionAlreadyExistsException
{
"errorClass" : "ROUTINE_ALREADY_EXISTS",
"sqlState" : "42723",
"messageParameters" : {
"existingRoutineType" : "routine",
"newRoutineType" : "routine",
"routineName" : "`default`.`foo3_3at`"
}
}
> Fix CREATE OR REPLACE for SQL UDFs
> ----------------------------------
>
> Key: SPARK-52148
> URL: https://issues.apache.org/jira/browse/SPARK-52148
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 4.1.0
> Reporter: Allison Wang
> Priority: Major
>
> – !query
> CREATE FUNCTION foo3_3at(x INT) RETURNS TABLE (a DOUBLE) RETURN SELECT 1 / x;
> – !query schema
> struct<>
> – !query output
>
> – !query
> CREATE OR REPLACE FUNCTION foo3_3at(x INT) RETURNS TABLE (a DOUBLE) RETURN
> SELECT 1 / x
> – !query schema
> struct<>
> – !query output
> org.apache.spark.sql.catalyst.analysis.FunctionAlreadyExistsException
> {
> "errorClass" : "ROUTINE_ALREADY_EXISTS",
> "sqlState" : "42723",
> "messageParameters" :
> { "existingRoutineType" : "routine", "newRoutineType" : "routine",
> "routineName" : "`default`.`foo3_3at`" }
> }
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]