Skip to content

Commit aa121d8

Browse files
committed
type STRING -> INTEGER: catch exception
1 parent 81cbebf commit aa121d8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

external/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/v2/OracleIntegrationSuite.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ class OracleIntegrationSuite extends DockerJDBCIntegrationSuite with SharedSpark
105105
val expectedSchema = new StructType().add("ID", StringType)
106106
assert(t.schema === expectedSchema)
107107
// Update column type from STRING to INTEGER
108-
sql("ALTER TABLE oracle.alt_table ALTER COLUMN id TYPE INTEGER")
109-
val t2 = spark.table("oracle.alt_table")
110-
assert(t2.schema === new StructType().add("ID", IntegerType))
108+
intercept[AnalysisException] {
109+
sql("ALTER TABLE oracle.alt_table ALTER COLUMN id TYPE INTEGER")
110+
}
111111
// Update not existing column
112112
intercept[AnalysisException] {
113113
sql("ALTER TABLE oracle.alt_table ALTER COLUMN bad_column TYPE DOUBLE")

0 commit comments

Comments
 (0)