@@ -667,9 +667,9 @@ true 5
667667# rpad with string, length, and fill arrays in every string width
668668query BBB
669669SELECT
670- rpad(arrow_cast(column1, 'Utf8'), column2, arrow_cast(column3, 'Utf8')) = column4,
671- rpad(arrow_cast(column1, 'LargeUtf8'), column2, arrow_cast(column3, 'LargeUtf8')) = column4,
672- rpad(arrow_cast(column1, 'Utf8View'), column2, arrow_cast(column3, 'Utf8View')) = column4
670+ rpad(arrow_cast(column1, 'Utf8'), column2, arrow_cast(column3, 'Utf8')) IS NOT DISTINCT FROM column4,
671+ rpad(arrow_cast(column1, 'LargeUtf8'), column2, arrow_cast(column3, 'LargeUtf8')) IS NOT DISTINCT FROM column4,
672+ rpad(arrow_cast(column1, 'Utf8View'), column2, arrow_cast(column3, 'Utf8View')) IS NOT DISTINCT FROM column4
673673FROM (VALUES
674674 ('hi', 5, 'xy', 'hixyx'),
675675 ('abcdef', 3, 'z', 'abc'),
@@ -684,21 +684,21 @@ true true true
684684true true true
685685true true true
686686true true true
687- NULL NULL NULL
688- NULL NULL NULL
689- NULL NULL NULL
687+ true true true
688+ true true true
689+ true true true
690690
691691# rpad array path with the default fill
692692query BBB
693693SELECT
694- rpad(arrow_cast(column1, 'Utf8'), column2) = column3,
695- rpad(arrow_cast(column1, 'LargeUtf8'), column2) = column3,
696- rpad(arrow_cast(column1, 'Utf8View'), column2) = column3
694+ rpad(arrow_cast(column1, 'Utf8'), column2) IS NOT DISTINCT FROM column3,
695+ rpad(arrow_cast(column1, 'LargeUtf8'), column2) IS NOT DISTINCT FROM column3,
696+ rpad(arrow_cast(column1, 'Utf8View'), column2) IS NOT DISTINCT FROM column3
697697FROM (VALUES ('hi', 5, 'hi '), ('abcdef', 3, 'abc'), (NULL, 5, NULL)) AS t(column1, column2, column3);
698698----
699699true true true
700700true true true
701- NULL NULL NULL
701+ true true true
702702
703703# a large scalar target length skips the scalar fast path
704704query I
@@ -707,16 +707,16 @@ SELECT character_length(rpad('x', 16385, 'a'));
70770716385
708708
709709# invalid argument count/type and excessive target length
710- query error DataFusion error:
710+ query error 'rpad' does not support zero arguments
711711SELECT rpad();
712712
713- query error DataFusion error:
713+ query error No function matches the given name and argument types 'rpad\(Utf8\)'
714714SELECT rpad('x');
715715
716- query error DataFusion error:
716+ query error No function matches the given name and argument types 'rpad\(Utf8, Int64, Utf8, Utf8\)'
717717SELECT rpad('x', 2, 'y', 'z');
718718
719- query error DataFusion error:
719+ query error No function matches the given name and argument types 'rpad\(Utf8, Utf8\)'
720720SELECT rpad('x', 'bad');
721721
722722query error rpad requested length 2147483648 too large
0 commit comments