Skip to content

Commit 636c8ec

Browse files
committed
Merge remote-tracking branch 'upstream' into vector-avg-sum-functions
2 parents d0ec2cd + 1aadbc4 commit 636c8ec

File tree

146 files changed

+10159
-579
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+10159
-579
lines changed

.github/workflows/build_and_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ jobs:
235235
needs: precondition
236236
if: fromJson(needs.precondition.outputs.required).build == 'true'
237237
runs-on: ubuntu-latest
238-
timeout-minutes: 120
238+
timeout-minutes: 150
239239
strategy:
240240
fail-fast: false
241241
matrix:

common/utils-java/src/main/java/org/apache/spark/internal/LogKeys.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ public enum LogKeys implements LogKey {
316316
JAVA_VERSION,
317317
JAVA_VM_NAME,
318318
JOB_ID,
319+
JOB_IDS,
319320
JOIN_CONDITION,
320321
JOIN_CONDITION_SUB_EXPR,
321322
JOIN_TYPE,

common/utils/src/main/resources/error/error-conditions.json

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1043,6 +1043,48 @@
10431043
},
10441044
"sqlState" : "21S01"
10451045
},
1046+
"CURSOR_ALREADY_EXISTS" : {
1047+
"message" : [
1048+
"Cannot declare cursor <cursorName> because it already exists in the current scope."
1049+
],
1050+
"sqlState" : "42723"
1051+
},
1052+
"CURSOR_ALREADY_OPEN" : {
1053+
"message" : [
1054+
"Cannot open cursor <cursorName> because it is already open."
1055+
],
1056+
"sqlState" : "24502"
1057+
},
1058+
"CURSOR_NOT_FOUND" : {
1059+
"message" : [
1060+
"Cursor <cursorName> not found in the current scope."
1061+
],
1062+
"sqlState" : "42883"
1063+
},
1064+
"CURSOR_NOT_OPEN" : {
1065+
"message" : [
1066+
"Cannot fetch from or close cursor <cursorName> because it is not open."
1067+
],
1068+
"sqlState" : "24501"
1069+
},
1070+
"CURSOR_NO_MORE_ROWS" : {
1071+
"message" : [
1072+
"No more rows available to fetch from cursor <cursorName>."
1073+
],
1074+
"sqlState" : "02000"
1075+
},
1076+
"CURSOR_OUTSIDE_SCRIPT" : {
1077+
"message" : [
1078+
"Cursor operations can only be used within SQL scripts."
1079+
],
1080+
"sqlState" : "0A000"
1081+
},
1082+
"CURSOR_REFERENCE_INVALID_QUALIFIER" : {
1083+
"message" : [
1084+
"Cursor reference <cursorName> is invalid. Cursor references can only have at most one qualifier (e.g., label.cursor)."
1085+
],
1086+
"sqlState" : "42601"
1087+
},
10461088
"CYCLIC_FUNCTION_REFERENCE" : {
10471089
"message" : [
10481090
"Cyclic function reference detected: <path>."
@@ -2796,6 +2838,12 @@
27962838
},
27972839
"sqlState" : "HY109"
27982840
},
2841+
"INVALID_CURSOR_DECLARATION" : {
2842+
"message" : [
2843+
"Cursors must be declared after variable/condition declarations, and before handlers and other statements."
2844+
],
2845+
"sqlState" : "42601"
2846+
},
27992847
"INVALID_DATETIME_PATTERN" : {
28002848
"message" : [
28012849
"Unrecognized datetime pattern: <pattern>."
@@ -3155,7 +3203,7 @@
31553203
},
31563204
"WRONG_PLACE_OF_DECLARATION" : {
31573205
"message" : [
3158-
"Handlers must be declared after variable/condition declaration, and before other statements."
3206+
"Handlers must be declared after variable/condition/cursor declarations, and before other statements."
31593207
]
31603208
}
31613209
},
@@ -7052,6 +7100,11 @@
70527100
"<variableName> is a VARIABLE and cannot be updated using the SET statement. Use SET VARIABLE <variableName> = ... instead."
70537101
]
70547102
},
7103+
"SQL_CURSOR" : {
7104+
"message" : [
7105+
"SQL cursor operations (DECLARE CURSOR, OPEN, FETCH, CLOSE) are not supported."
7106+
]
7107+
},
70557108
"SQL_SCRIPTING" : {
70567109
"message" : [
70577110
"SQL Scripting is under development and not all features are supported. SQL Scripting enables users to write procedural SQL including control flow and error handling. To enable existing features set <sqlScriptingEnabled> to `true`."

connector/avro/src/test/scala/org/apache/spark/sql/avro/AvroSuite.scala

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3482,4 +3482,29 @@ class AvroV2Suite extends AvroSuite with ExplainSuiteHelper {
34823482
checkAnswer(readDf, df)
34833483
}
34843484
}
3485+
3486+
test("Geospatial types are not supported in Avro") {
3487+
withTempDir { dir =>
3488+
// Temporary directory for writing the test data.
3489+
val tempDir = new File(dir, "files").getCanonicalPath
3490+
// Test data: WKB representation of POINT(1 2).
3491+
val wkb = "0101000000000000000000F03F0000000000000040"
3492+
// Test GEOMETRY and GEOGRAPHY data types.
3493+
val geoTestCases = Seq(
3494+
(s"ST_GeomFromWKB(X'$wkb')", "\"GEOMETRY(0)\""),
3495+
(s"ST_GeogFromWKB(X'$wkb')", "\"GEOGRAPHY(4326)\"")
3496+
)
3497+
geoTestCases.foreach { case (expr, expectedType) =>
3498+
checkError(
3499+
exception = intercept[AnalysisException] {
3500+
sql(s"select $expr as g").write.format("avro").mode("overwrite").save(tempDir)
3501+
},
3502+
condition = "UNSUPPORTED_DATA_TYPE_FOR_DATASOURCE",
3503+
parameters = Map(
3504+
"columnName" -> "`g`",
3505+
"columnType" -> expectedType,
3506+
"format" -> "Avro"))
3507+
}
3508+
}
3509+
}
34853510
}

core/src/main/scala/org/apache/spark/Dependency.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ class ShuffleDependency[K: ClassTag, V: ClassTag, C: ClassTag](
9090
val mapSideCombine: Boolean = false,
9191
val shuffleWriterProcessor: ShuffleWriteProcessor = new ShuffleWriteProcessor,
9292
val rowBasedChecksums: Array[RowBasedChecksum] = ShuffleDependency.EMPTY_ROW_BASED_CHECKSUMS,
93-
private val _checksumMismatchFullRetryEnabled: Boolean = false)
93+
private val _checksumMismatchFullRetryEnabled: Boolean = false,
94+
val checksumMismatchQueryLevelRollbackEnabled: Boolean = false)
9495
extends Dependency[Product2[K, V]] with Logging {
9596

9697
def this(

core/src/main/scala/org/apache/spark/SparkContext.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3152,6 +3152,7 @@ object SparkContext extends Logging {
31523152
private[spark] val SPARK_SCHEDULER_POOL = "spark.scheduler.pool"
31533153
private[spark] val RDD_SCOPE_KEY = "spark.rdd.scope"
31543154
private[spark] val RDD_SCOPE_NO_OVERRIDE_KEY = "spark.rdd.scope.noOverride"
3155+
private[spark] val SQL_EXECUTION_ID_KEY = "spark.sql.execution.id"
31553156

31563157
/**
31573158
* Executor id for the driver. In earlier versions of Spark, this was `<driver>`, but this was

0 commit comments

Comments
 (0)