@@ -203,6 +203,14 @@ private[v2] trait V2JDBCTest extends SharedSparkSession with DockerIntegrationFu
203
203
assert(jdbcTable.indexExists(" i2" ) == false )
204
204
205
205
val properties = new util.Properties ();
206
+ val indexType = " DUMMY"
207
+ var m = intercept[UnsupportedOperationException ] {
208
+ jdbcTable.createIndex(" i1" , indexType, Array (FieldReference (" col1" )),
209
+ Array .empty[util.Map [NamedReference , util.Properties ]], properties)
210
+ }.getMessage
211
+ assert(m.contains(s " Index Type $indexType is not supported. " +
212
+ s " The supported Index Types are: BTREE and HASH " ))
213
+
206
214
jdbcTable.createIndex(" i1" , " BTREE" , Array (FieldReference (" col1" )),
207
215
Array .empty[util.Map [NamedReference , util.Properties ]], properties)
208
216
@@ -213,7 +221,7 @@ private[v2] trait V2JDBCTest extends SharedSparkSession with DockerIntegrationFu
213
221
assert(jdbcTable.indexExists(" i1" ) == true )
214
222
assert(jdbcTable.indexExists(" i2" ) == true )
215
223
216
- var m = intercept[IndexAlreadyExistsException ] {
224
+ m = intercept[IndexAlreadyExistsException ] {
217
225
jdbcTable.createIndex(" i1" , " " , Array (FieldReference (" col1" )),
218
226
Array .empty[util.Map [NamedReference , util.Properties ]], properties)
219
227
}.getMessage
0 commit comments