@@ -1647,7 +1647,8 @@ class ScanSuite extends AnyFunSuite with TestUtils
16471647 val schema = new StructType ()
16481648 .add(" c1" , c1Type, true )
16491649 .add(" c2" , c2Type, true )
1650- val c1Collation = c1Type.getCollationIdentifier
1650+ val c1Collation =
1651+ schema.get(" c1" ).getDataType.asInstanceOf [StringType ].getCollationIdentifier
16511652
16521653 getCreateTxn(defaultEngine, tablePath, schema, List (" c1" )).commit(
16531654 defaultEngine,
@@ -1765,7 +1766,8 @@ class ScanSuite extends AnyFunSuite with TestUtils
17651766 val schema = new StructType ()
17661767 .add(" c1" , c1Type, true )
17671768 .add(" c2" , c2Type, true )
1768- val c1Collation = c1Type.getCollationIdentifier
1769+ val c1Collation =
1770+ schema.get(" c1" ).getDataType.asInstanceOf [StringType ].getCollationIdentifier
17691771
17701772 getCreateTxn(defaultEngine, tablePath, schema, List (" c1" )).commit(
17711773 defaultEngine,
@@ -2024,7 +2026,8 @@ class ScanSuite extends AnyFunSuite with TestUtils
20242026 val schema = new StructType ()
20252027 .add(" c1" , c1Type, true )
20262028 .add(" c2" , c2Type, true )
2027- val c1Collation = c1Type.getCollationIdentifier
2029+ val c1Collation =
2030+ schema.get(" c1" ).getDataType.asInstanceOf [StringType ].getCollationIdentifier
20282031
20292032 getCreateTxn(defaultEngine, tablePath, schema, List (" c1" )).commit(
20302033 defaultEngine,
@@ -2236,8 +2239,9 @@ class ScanSuite extends AnyFunSuite with TestUtils
22362239 withTempDir { tempDir =>
22372240 val tablePath = tempDir.getCanonicalPath
22382241 val schema = new StructType ()
2239- .add(" c1" , STRING , true )
2240- .add(" c2" , STRING , true )
2242+ .add(" c1" , c1Type, true )
2243+ .add(" c2" , c2Type, true )
2244+
22412245 getCreateTxn(defaultEngine, tablePath, schema, List .empty).commit(
22422246 defaultEngine,
22432247 emptyIterable())
@@ -2407,7 +2411,8 @@ class ScanSuite extends AnyFunSuite with TestUtils
24072411 .add(" c1" , c1Type, true )
24082412 .add(" c2" , c2Type, true )
24092413 .add(" c3" , c3Type, true )
2410- val c1Collation = c1Type.getCollationIdentifier
2414+ val c1Collation =
2415+ schema.get(" c1" ).getDataType.asInstanceOf [StringType ].getCollationIdentifier
24112416
24122417 getCreateTxn(defaultEngine, tablePath, schema, List (" c1" )).commit(
24132418 defaultEngine,
@@ -2494,14 +2499,14 @@ class ScanSuite extends AnyFunSuite with TestUtils
24942499 (utf8LcaseString, unicodeString, unicodeString),
24952500 (STRING , utf8LcaseString, unicodeString),
24962501 (STRING , utf8LcaseString, STRING ),
2497- (unicodeString, STRING , utf8LcaseString)).foreach { case (pType , c2Type, c3Type) =>
2502+ (unicodeString, STRING , utf8LcaseString)).foreach { case (c1Type , c2Type, c3Type) =>
24982503 withTempDir { tempDir =>
24992504 val tablePath = tempDir.getCanonicalPath
25002505 val schema = new StructType ()
2501- .add(" p " , pType , true )
2506+ .add(" c1 " , c1Type , true )
25022507 .add(" c2" , c2Type, true )
25032508 .add(" c3" , c3Type, true )
2504- val c1Collation = pType .getCollationIdentifier
2509+ val c1Collation = c1Type .getCollationIdentifier
25052510
25062511 getCreateTxn(defaultEngine, tablePath, schema, List (" c1" )).commit(
25072512 defaultEngine,
0 commit comments