Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/src/main/resources/error/error-classes.json
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,7 @@
},
"INVALID_TEMP_OBJ_REFERENCE" : {
"message" : [
"Cannot create a persistent <obj> <objName> by referencing a temporary <tempObj> <tempObjName>. Please make the temporary <tempObj> persistent, or make the persistent <obj> temporary."
"Cannot create the persistent object <objName> of the type <obj> because it references to the temporary object <tempObjName> of the type <tempObj>. Please make the temporary object <tempObjName> persistent, or make the persistent object <objName> temporary."
]
},
"INVALID_TYPED_LITERAL" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2692,9 +2692,9 @@ private[sql] object QueryCompilationErrors extends QueryErrorsBase {
new AnalysisException(
errorClass = "INVALID_TEMP_OBJ_REFERENCE",
messageParameters = Map(
"obj" -> "view",
"obj" -> "VIEW",
"objName" -> toSQLId(name.nameParts),
"tempObj" -> "view",
"tempObj" -> "VIEW",
"tempObjName" -> toSQLId(nameParts)))
}

Expand All @@ -2704,9 +2704,9 @@ private[sql] object QueryCompilationErrors extends QueryErrorsBase {
new AnalysisException(
errorClass = "INVALID_TEMP_OBJ_REFERENCE",
messageParameters = Map(
"obj" -> "view",
"obj" -> "VIEW",
"objName" -> toSQLId(name.nameParts),
"tempObj" -> "function",
"tempObj" -> "FUNCTION",
"tempObjName" -> toSQLId(funcName)))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,9 @@ org.apache.spark.sql.AnalysisException
{
"errorClass" : "INVALID_TEMP_OBJ_REFERENCE",
"messageParameters" : {
"obj" : "view",
"obj" : "VIEW",
"objName" : "`spark_catalog`.`temp_view_test`.`v1_temp`",
"tempObj" : "view",
"tempObj" : "VIEW",
"tempObjName" : "`temp_table`"
}
}
Expand Down Expand Up @@ -344,9 +344,9 @@ org.apache.spark.sql.AnalysisException
{
"errorClass" : "INVALID_TEMP_OBJ_REFERENCE",
"messageParameters" : {
"obj" : "view",
"obj" : "VIEW",
"objName" : "`spark_catalog`.`temp_view_test`.`v3_temp`",
"tempObj" : "view",
"tempObj" : "VIEW",
"tempObjName" : "`temp_table`"
}
}
Expand Down Expand Up @@ -401,9 +401,9 @@ org.apache.spark.sql.AnalysisException
{
"errorClass" : "INVALID_TEMP_OBJ_REFERENCE",
"messageParameters" : {
"obj" : "view",
"obj" : "VIEW",
"objName" : "`spark_catalog`.`temp_view_test`.`v4_temp`",
"tempObj" : "view",
"tempObj" : "VIEW",
"tempObjName" : "`temp_table`"
}
}
Expand All @@ -421,9 +421,9 @@ org.apache.spark.sql.AnalysisException
{
"errorClass" : "INVALID_TEMP_OBJ_REFERENCE",
"messageParameters" : {
"obj" : "view",
"obj" : "VIEW",
"objName" : "`spark_catalog`.`temp_view_test`.`v5_temp`",
"tempObj" : "view",
"tempObj" : "VIEW",
"tempObjName" : "`temp_table`"
}
}
Expand Down Expand Up @@ -588,9 +588,9 @@ org.apache.spark.sql.AnalysisException
{
"errorClass" : "INVALID_TEMP_OBJ_REFERENCE",
"messageParameters" : {
"obj" : "view",
"obj" : "VIEW",
"objName" : "`spark_catalog`.`temp_view_test`.`v6_temp`",
"tempObj" : "view",
"tempObj" : "VIEW",
"tempObjName" : "`temp_table`"
}
}
Expand All @@ -605,9 +605,9 @@ org.apache.spark.sql.AnalysisException
{
"errorClass" : "INVALID_TEMP_OBJ_REFERENCE",
"messageParameters" : {
"obj" : "view",
"obj" : "VIEW",
"objName" : "`spark_catalog`.`temp_view_test`.`v7_temp`",
"tempObj" : "view",
"tempObj" : "VIEW",
"tempObjName" : "`temp_table`"
}
}
Expand All @@ -622,9 +622,9 @@ org.apache.spark.sql.AnalysisException
{
"errorClass" : "INVALID_TEMP_OBJ_REFERENCE",
"messageParameters" : {
"obj" : "view",
"obj" : "VIEW",
"objName" : "`spark_catalog`.`temp_view_test`.`v8_temp`",
"tempObj" : "view",
"tempObj" : "VIEW",
"tempObjName" : "`temp_table`"
}
}
Expand All @@ -639,9 +639,9 @@ org.apache.spark.sql.AnalysisException
{
"errorClass" : "INVALID_TEMP_OBJ_REFERENCE",
"messageParameters" : {
"obj" : "view",
"obj" : "VIEW",
"objName" : "`spark_catalog`.`temp_view_test`.`v9_temp`",
"tempObj" : "view",
"tempObj" : "VIEW",
"tempObjName" : "`temp_table`"
}
}
Expand Down Expand Up @@ -795,9 +795,9 @@ org.apache.spark.sql.AnalysisException
{
"errorClass" : "INVALID_TEMP_OBJ_REFERENCE",
"messageParameters" : {
"obj" : "view",
"obj" : "VIEW",
"objName" : "`spark_catalog`.`testviewschm2`.`temporal1`",
"tempObj" : "view",
"tempObj" : "VIEW",
"tempObjName" : "`tt`"
}
}
Expand Down Expand Up @@ -844,9 +844,9 @@ org.apache.spark.sql.AnalysisException
{
"errorClass" : "INVALID_TEMP_OBJ_REFERENCE",
"messageParameters" : {
"obj" : "view",
"obj" : "VIEW",
"objName" : "`spark_catalog`.`testviewschm2`.`temporal2`",
"tempObj" : "view",
"tempObj" : "VIEW",
"tempObjName" : "`tt`"
}
}
Expand Down Expand Up @@ -893,9 +893,9 @@ org.apache.spark.sql.AnalysisException
{
"errorClass" : "INVALID_TEMP_OBJ_REFERENCE",
"messageParameters" : {
"obj" : "view",
"obj" : "VIEW",
"objName" : "`spark_catalog`.`testviewschm2`.`temporal3`",
"tempObj" : "view",
"tempObj" : "VIEW",
"tempObjName" : "`tt`"
}
}
Expand Down Expand Up @@ -942,9 +942,9 @@ org.apache.spark.sql.AnalysisException
{
"errorClass" : "INVALID_TEMP_OBJ_REFERENCE",
"messageParameters" : {
"obj" : "view",
"obj" : "VIEW",
"objName" : "`spark_catalog`.`testviewschm2`.`temporal4`",
"tempObj" : "view",
"tempObj" : "VIEW",
"tempObjName" : "`tt`"
}
}
Expand All @@ -959,9 +959,9 @@ org.apache.spark.sql.AnalysisException
{
"errorClass" : "INVALID_TEMP_OBJ_REFERENCE",
"messageParameters" : {
"obj" : "view",
"obj" : "VIEW",
"objName" : "`spark_catalog`.`testviewschm2`.`temporal5`",
"tempObj" : "view",
"tempObj" : "VIEW",
"tempObjName" : "`tt`"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3972,9 +3972,9 @@ class SQLQuerySuite extends QueryTest with SharedSparkSession with AdaptiveSpark
exception = e,
errorClass = "INVALID_TEMP_OBJ_REFERENCE",
parameters = Map(
"obj" -> "view",
"obj" -> "VIEW",
"objName" -> s"`$SESSION_CATALOG_NAME`.`default`.`$testViewName`",
"tempObj" -> "view",
"tempObj" -> "VIEW",
"tempObjName" -> s"`$tempViewName`"))

val e2 = intercept[AnalysisException] {
Expand All @@ -3991,9 +3991,9 @@ class SQLQuerySuite extends QueryTest with SharedSparkSession with AdaptiveSpark
exception = e2,
errorClass = "INVALID_TEMP_OBJ_REFERENCE",
parameters = Map(
"obj" -> "view",
"obj" -> "VIEW",
"objName" -> s"`$SESSION_CATALOG_NAME`.`default`.`$testViewName`",
"tempObj" -> "function",
"tempObj" -> "FUNCTION",
"tempObjName" -> s"`$tempFuncName`"))
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2408,9 +2408,9 @@ class DataSourceV2SQLSuiteV1Filter
},
errorClass = "INVALID_TEMP_OBJ_REFERENCE",
parameters = Map(
"obj" -> "view",
"obj" -> "VIEW",
"objName" -> "`spark_catalog`.`default`.`v`",
"tempObj" -> "view",
"tempObj" -> "VIEW",
"tempObjName" -> "`t`"))
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ abstract class SQLViewSuite extends QueryTest with SQLTestUtils {
},
errorClass = "INVALID_TEMP_OBJ_REFERENCE",
parameters = Map(
"obj" -> "view",
"obj" -> "VIEW",
"objName" -> s"`$SESSION_CATALOG_NAME`.`default`.`jtv1`",
"tempObj" -> "view",
"tempObj" -> "VIEW",
"tempObjName" -> "`temp_jtv1`"))
val globalTempDB = spark.sharedState.globalTempViewManager.database
sql("CREATE GLOBAL TEMP VIEW global_temp_jtv1 AS SELECT * FROM jt WHERE id > 0")
Expand All @@ -99,9 +99,9 @@ abstract class SQLViewSuite extends QueryTest with SQLTestUtils {
},
errorClass = "INVALID_TEMP_OBJ_REFERENCE",
parameters = Map(
"obj" -> "view",
"obj" -> "VIEW",
"objName" -> s"`$SESSION_CATALOG_NAME`.`default`.`jtv1`",
"tempObj" -> "view",
"tempObj" -> "VIEW",
"tempObjName" -> "`global_temp`.`global_temp_jtv1`"))
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -616,9 +616,9 @@ class PersistedViewTestSuite extends SQLViewTestSuite with SharedSparkSession {
},
errorClass = "INVALID_TEMP_OBJ_REFERENCE",
parameters = Map(
"obj" -> "view",
"obj" -> "VIEW",
"objName" -> s"`$SESSION_CATALOG_NAME`.`default`.`v1`",
"tempObj" -> "view",
"tempObj" -> "VIEW",
"tempObjName" -> "`v2`"))
val tempFunctionName = "temp_udf"
val functionClass = "test.org.apache.spark.sql.MyDoubleAvg"
Expand All @@ -630,9 +630,9 @@ class PersistedViewTestSuite extends SQLViewTestSuite with SharedSparkSession {
},
errorClass = "INVALID_TEMP_OBJ_REFERENCE",
parameters = Map(
"obj" -> "view",
"obj" -> "VIEW",
"objName" -> s"`$SESSION_CATALOG_NAME`.`default`.`v1`",
"tempObj" -> "function",
"tempObj" -> "FUNCTION",
"tempObjName" -> s"`$tempFunctionName`"))
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ class HiveSQLViewSuite extends SQLViewSuite with TestHiveSingleton {
exception = e,
errorClass = "INVALID_TEMP_OBJ_REFERENCE",
parameters = Map(
"obj" -> "view",
"obj" -> "VIEW",
"objName" -> s"`$SESSION_CATALOG_NAME`.`default`.`view1`",
"tempObj" -> "function",
"tempObj" -> "FUNCTION",
"tempObjName" -> s"`$tempFunctionName`"))
}
}
Expand Down