Skip to content

Commit 81cbebf

Browse files
committed
type STRING -> INTEGER
1 parent a526470 commit 81cbebf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ class OracleIntegrationSuite extends DockerJDBCIntegrationSuite with SharedSpark
104104
val t = spark.table("oracle.alt_table")
105105
val expectedSchema = new StructType().add("ID", StringType)
106106
assert(t.schema === expectedSchema)
107+
// 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))
107111
// Update not existing column
108112
intercept[AnalysisException] {
109113
sql("ALTER TABLE oracle.alt_table ALTER COLUMN bad_column TYPE DOUBLE")

0 commit comments

Comments
 (0)