@@ -34,34 +34,34 @@ class JdbcUtilsSuite extends SparkFunSuite {
3434 assert(JdbcUtils .getCustomSchema(tableSchema, " " , caseInsensitive) === tableSchema)
3535
3636 assert(JdbcUtils .getCustomSchema(tableSchema, " c1 DATE" , caseInsensitive) ===
37- StructType (Seq (StructField (" C1" , DateType , true ), StructField (" C2" , IntegerType , false ))))
37+ StructType (Seq (StructField (" C1" , DateType , false ), StructField (" C2" , IntegerType , false ))))
3838 assert(JdbcUtils .getCustomSchema(tableSchema, " c1 DATE" , caseSensitive) ===
3939 StructType (Seq (StructField (" C1" , StringType , false ), StructField (" C2" , IntegerType , false ))))
4040
4141 assert(
4242 JdbcUtils .getCustomSchema(tableSchema, " c1 DATE, C2 STRING" , caseInsensitive) ===
43- StructType (Seq (StructField (" C1" , DateType , true ), StructField (" C2" , StringType , true ))))
43+ StructType (Seq (StructField (" C1" , DateType , false ), StructField (" C2" , StringType , false ))))
4444 assert(JdbcUtils .getCustomSchema(tableSchema, " c1 DATE, C2 STRING" , caseSensitive) ===
45- StructType (Seq (StructField (" C1" , StringType , false ), StructField (" C2" , StringType , true ))))
45+ StructType (Seq (StructField (" C1" , StringType , false ), StructField (" C2" , StringType , false ))))
4646
4747 // Throw AnalysisException
4848 val duplicate = intercept[AnalysisException ]{
4949 JdbcUtils .getCustomSchema(tableSchema, " c1 DATE, c1 STRING" , caseInsensitive) ===
50- StructType (Seq (StructField (" c1" , DateType , true ), StructField (" c1" , StringType , true )))
50+ StructType (Seq (StructField (" c1" , DateType , false ), StructField (" c1" , StringType , false )))
5151 }
5252 assert(duplicate.getMessage.contains(
5353 " Found duplicate column(s) in the customSchema option value" ))
5454
5555 // Throw ParseException
5656 val dataTypeNotSupported = intercept[ParseException ]{
5757 JdbcUtils .getCustomSchema(tableSchema, " c3 DATEE, C2 STRING" , caseInsensitive) ===
58- StructType (Seq (StructField (" c3" , DateType , true ), StructField (" C2" , StringType , true )))
58+ StructType (Seq (StructField (" c3" , DateType , false ), StructField (" C2" , StringType , false )))
5959 }
6060 assert(dataTypeNotSupported.getMessage.contains(" DataType datee is not supported" ))
6161
6262 val mismatchedInput = intercept[ParseException ]{
6363 JdbcUtils .getCustomSchema(tableSchema, " c3 DATE. C2 STRING" , caseInsensitive) ===
64- StructType (Seq (StructField (" c3" , DateType , true ), StructField (" C2" , StringType , true )))
64+ StructType (Seq (StructField (" c3" , DateType , false ), StructField (" C2" , StringType , false )))
6565 }
6666 assert(mismatchedInput.getMessage.contains(" mismatched input '.' expecting" ))
6767 }
0 commit comments