Skip to content

Commit 04f8991

Browse files
committed
port case_builtin_math_expression to functions.slt
1 parent 65510ec commit 04f8991

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
@@ -525,25 +525,43 @@ drop table aggregate_test_100
525525

526526
# case_sensitive_identifiers_functions
527527
statement ok
528-
create table t (i int) as values (1);
528+
create table t as values (
529+
arrow_cast(2, 'Int8'),
530+
arrow_cast(2, 'Int16'),
531+
arrow_cast(2, 'Int32'),
532+
arrow_cast(2, 'Int64'),
533+
arrow_cast(2, 'UInt8'),
534+
arrow_cast(2, 'UInt16'),
535+
arrow_cast(2, 'UInt32'),
536+
arrow_cast(2, 'UInt64'),
537+
arrow_cast(2, 'Float32'),
538+
arrow_cast(2, 'Float64')
539+
)
540+
;
529541

530542
query R
531-
SELECT sqrt(i) FROM t
543+
SELECT sqrt(column1) FROM t
532544
----
533-
1
545+
1.4142135623730951
534546

535547
query R
536-
SELECT SQRT(i) FROM t
548+
SELECT SQRT(column1) FROM t
537549
----
538-
1
550+
1.4142135623730951
539551

540552
statement error Error during planning: Invalid function 'SQRT'
541-
SELECT "SQRT"(i) FROM t
553+
SELECT "SQRT"(column1) FROM t
542554

543555
query R
544-
SELECT "sqrt"(i) FROM t
556+
SELECT "sqrt"(column1) FROM t
545557
----
546-
1
558+
1.4142135623730951
559+
560+
# case_builtin_math_expression
561+
query RRRRRRRRRR
562+
SELECT sqrt(column1),sqrt(column2),sqrt(column3),sqrt(column4),sqrt(column5),sqrt(column6),sqrt(column7),sqrt(column8),sqrt(column9),sqrt(column10) FROM t
563+
----
564+
1.4142135623730951 1.4142135623730951 1.4142135623730951 1.4142135623730951 1.4142135623730951 1.4142135623730951 1.4142135623730951 1.4142135623730951 1.4142135 1.4142135623730951
547565

548566
statement ok
549567
drop table t

0 commit comments

Comments
 (0)