Skip to content

Commit be25002

Browse files
committed
port case_builtin_math_expression to functions.slt
1 parent 22e5df3 commit be25002

File tree

3 files changed

+26
-96
lines changed

3 files changed

+26
-96
lines changed

datafusion/core/tests/sql/functions.rs

Lines changed: 0 additions & 87 deletions
This file was deleted.

datafusion/core/tests/sql/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ pub mod arrow_files;
8484
pub mod create_drop;
8585
pub mod explain_analyze;
8686
pub mod expr;
87-
pub mod functions;
8887
pub mod group_by;
8988
pub mod joins;
9089
pub mod limit;

datafusion/core/tests/sqllogictests/test_files/functions.slt

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -504,25 +504,43 @@ drop table aggregate_test_100
504504

505505
# case_sensitive_identifiers_functions
506506
statement ok
507-
create table t (i int) as values (1);
507+
create table t as values (
508+
arrow_cast(2, 'Int8'),
509+
arrow_cast(2, 'Int16'),
510+
arrow_cast(2, 'Int32'),
511+
arrow_cast(2, 'Int64'),
512+
arrow_cast(2, 'UInt8'),
513+
arrow_cast(2, 'UInt16'),
514+
arrow_cast(2, 'UInt32'),
515+
arrow_cast(2, 'UInt64'),
516+
arrow_cast(2, 'Float32'),
517+
arrow_cast(2, 'Float64')
518+
)
519+
;
508520

509521
query R
510-
SELECT sqrt(i) FROM t
522+
SELECT sqrt(column1) FROM t
511523
----
512-
1
524+
1.4142135623730951
513525

514526
query R
515-
SELECT SQRT(i) FROM t
527+
SELECT SQRT(column1) FROM t
516528
----
517-
1
529+
1.4142135623730951
518530

519531
statement error Error during planning: Invalid function 'SQRT'
520-
SELECT "SQRT"(i) FROM t
532+
SELECT "SQRT"(column1) FROM t
521533

522534
query R
523-
SELECT "sqrt"(i) FROM t
535+
SELECT "sqrt"(column1) FROM t
524536
----
525-
1
537+
1.4142135623730951
538+
539+
# case_builtin_math_expression
540+
query RRRRRRRRRR
541+
SELECT sqrt(column1),sqrt(column2),sqrt(column3),sqrt(column4),sqrt(column5),sqrt(column6),sqrt(column7),sqrt(column8),sqrt(column9),sqrt(column10) FROM t
542+
----
543+
1.4142135623730951 1.4142135623730951 1.4142135623730951 1.4142135623730951 1.4142135623730951 1.4142135623730951 1.4142135623730951 1.4142135623730951 1.4142135 1.4142135623730951
526544

527545
statement ok
528546
drop table t

0 commit comments

Comments
 (0)