You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spark/src/test/scala/org/apache/comet/exec/CometNativeReaderSuite.scala
+13-13Lines changed: 13 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -436,15 +436,15 @@ class CometNativeReaderSuite extends CometTestBase with AdaptiveSparkPlanHelper
436
436
"""
437
437
|select 1 a
438
438
|""".stripMargin,
439
-
"select array(1, 2, 3, null) from tbl")
439
+
"select array(1, 2, null, 3, null) from tbl")
440
440
}
441
441
442
442
test("native reader - support ARRAY literal BOOL fields") {
443
443
testSingleLineQuery(
444
444
"""
445
445
|select 1 a
446
446
|""".stripMargin,
447
-
"select array(true, false, null) from tbl")
447
+
"select array(true, null, false, null) from tbl")
448
448
}
449
449
450
450
test("native reader - support ARRAY literal NULL fields") {
@@ -468,87 +468,87 @@ class CometNativeReaderSuite extends CometTestBase with AdaptiveSparkPlanHelper
468
468
"""
469
469
|select 1 a
470
470
|""".stripMargin,
471
-
"select array(1, 2, 3, null) from tbl")
471
+
"select array(1, 2, null, 3, null) from tbl")
472
472
}
473
473
474
474
test("native reader - support ARRAY literal SHORT fields") {
475
475
testSingleLineQuery(
476
476
"""
477
477
|select 1 a
478
478
|""".stripMargin,
479
-
"select array(cast(1 as short), cast(2 as short), cast(3 as short), null) from tbl")
479
+
"select array(cast(1 as short), cast(2 as short), null, cast(3 as short), null) from tbl")
480
480
}
481
481
482
482
test("native reader - support ARRAY literal DATE fields") {
483
483
testSingleLineQuery(
484
484
"""
485
485
|select 1 a
486
486
|""".stripMargin,
487
-
"select array(CAST('2024-01-01' AS DATE), CAST('2024-02-01' AS DATE), CAST('2024-03-01' AS DATE), null) from tbl")
487
+
"select array(CAST('2024-01-01' AS DATE), CAST('2024-02-01' AS DATE), null, CAST('2024-03-01' AS DATE), null) from tbl")
488
488
}
489
489
490
490
test("native reader - support ARRAY literal LONG fields") {
491
491
testSingleLineQuery(
492
492
"""
493
493
|select 1 a
494
494
|""".stripMargin,
495
-
"select array(cast(1 as bigint), cast(2 as bigint), cast(3 as bigint), null) from tbl")
495
+
"select array(cast(1 as bigint), cast(2 as bigint), null, cast(3 as bigint), null) from tbl")
496
496
}
497
497
498
498
test("native reader - support ARRAY literal TIMESTAMP fields") {
499
499
testSingleLineQuery(
500
500
"""
501
501
|select 1 a
502
502
|""".stripMargin,
503
-
"select array(CAST('2024-01-01 10:00:00' AS TIMESTAMP), CAST('2024-01-02 10:00:00' AS TIMESTAMP), CAST('2024-01-03 10:00:00' AS TIMESTAMP), null) from tbl")
503
+
"select array(CAST('2024-01-01 10:00:00' AS TIMESTAMP), CAST('2024-01-02 10:00:00' AS TIMESTAMP), null, CAST('2024-01-03 10:00:00' AS TIMESTAMP), null) from tbl")
504
504
}
505
505
506
506
test("native reader - support ARRAY literal TIMESTAMP TZ fields") {
507
507
testSingleLineQuery(
508
508
"""
509
509
|select 1 a
510
510
|""".stripMargin,
511
-
"select array(CAST('2024-01-01 10:00:00' AS TIMESTAMP_NTZ), CAST('2024-01-02 10:00:00' AS TIMESTAMP_NTZ), CAST('2024-01-03 10:00:00' AS TIMESTAMP_NTZ), null) from tbl")
511
+
"select array(CAST('2024-01-01 10:00:00' AS TIMESTAMP_NTZ), CAST('2024-01-02 10:00:00' AS TIMESTAMP_NTZ), null, CAST('2024-01-03 10:00:00' AS TIMESTAMP_NTZ), null) from tbl")
512
512
}
513
513
514
514
test("native reader - support ARRAY literal FLOAT fields") {
515
515
testSingleLineQuery(
516
516
"""
517
517
|select 1 a
518
518
|""".stripMargin,
519
-
"select array(cast(1 as float), cast(2 as float), cast(3 as float), null) from tbl")
519
+
"select array(cast(1 as float), cast(2 as float), null, cast(3 as float), null) from tbl")
520
520
}
521
521
522
522
test("native reader - support ARRAY literal DOUBLE fields") {
523
523
testSingleLineQuery(
524
524
"""
525
525
|select 1 a
526
526
|""".stripMargin,
527
-
"select array(cast(1 as double), cast(2 as double), cast(3 as double), null) from tbl")
527
+
"select array(cast(1 as double), cast(2 as double), null, cast(3 as double), null) from tbl")
528
528
}
529
529
530
530
test("native reader - support ARRAY literal STRING fields") {
531
531
testSingleLineQuery(
532
532
"""
533
533
|select 1 a
534
534
|""".stripMargin,
535
-
"select array('a', 'bc', 'def', null) from tbl")
535
+
"select array('a', 'bc', null, 'def', null) from tbl")
536
536
}
537
537
538
538
test("native reader - support ARRAY literal DECIMAL fields") {
539
539
testSingleLineQuery(
540
540
"""
541
541
|select 1 a
542
542
|""".stripMargin,
543
-
"select array(cast(1 as decimal(10, 2)), cast(2.5 as decimal(10, 2)),cast(3.75 as decimal(10, 2)), null) from tbl")
543
+
"select array(cast(1 as decimal(10, 2)), cast(2.5 as decimal(10, 2)), null, cast(3.75 as decimal(10, 2)), null) from tbl")
544
544
}
545
545
546
546
test("native reader - support ARRAY literal BINARY fields") {
547
547
testSingleLineQuery(
548
548
"""
549
549
|select 1 a
550
550
|""".stripMargin,
551
-
"select array(cast('a' as binary), cast('bc' as binary), cast('def' as binary), null) from tbl")
551
+
"select array(cast('a' as binary), cast('bc' as binary), null, cast('def' as binary), null) from tbl")
0 commit comments