Changeset: 81f87ece2e73 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=81f87ece2e73 Added Files: sql/test/BugTracker-2009/Tests/AVG_ReturnsNoLines.SF-2596084.test sql/test/BugTracker-2009/Tests/AVG_of_SQRT.SF-2757642.test sql/test/BugTracker-2009/Tests/BOM.SF-2787813.test sql/test/BugTracker-2009/Tests/COPY_INTO_char_NULL.SF-2560780.test.in sql/test/BugTracker-2009/Tests/Division_by_zero_error.SF-2791361.test sql/test/BugTracker-2009/Tests/Floating_point_exception.SF-2791356.test sql/test/BugTracker-2009/Tests/IS_NULL_in_CASE.test sql/test/BugTracker-2009/Tests/LE_vs_GE_in_CASE.SF-2562264.test sql/test/BugTracker-2009/Tests/TribooleanFailureWithSubquery.SF-2679434.test sql/test/BugTracker-2009/Tests/TypeException_having_count_distinct.SF-2494227.test sql/test/BugTracker-2009/Tests/addmonths_missing.SF-2854949.test sql/test/BugTracker-2009/Tests/alter_table_drop_constraint.SF-2803477.test sql/test/BugTracker-2009/Tests/alter_table_drop_constraint.SF-2803477_cleanup.test sql/test/BugTracker-2009/Tests/ambiguous_order_by.SF-2827916.test sql/test/BugTracker-2009/Tests/ambiguous_view.test sql/test/BugTracker-2009/Tests/and_and_or_type_exception.SF-2896012.test sql/test/BugTracker-2009/Tests/arithmetic-small-values-null.SF-2921310.test sql/test/BugTracker-2009/Tests/assert_in_update.SF-2807336.test sql/test/BugTracker-2009/Tests/avg-bug.SF-2132666.test sql/test/BugTracker-2009/Tests/binop.SF.2499537.test sql/test/BugTracker-2009/Tests/bit_and.SF-2850341.test sql/test/BugTracker-2009/Tests/bool-str-bug.test sql/test/BugTracker-2009/Tests/cardinality_of_expression_is_wrong.SF-2581617.test sql/test/BugTracker-2009/Tests/case_evaluates_all_branches.SF-2893484.test sql/test/BugTracker-2009/Tests/caselessthen.test sql/test/BugTracker-2009/Tests/coercion.test sql/test/BugTracker-2009/Tests/copy_into_error_off_by_one.SF-2833696.test sql/test/BugTracker-2009/Tests/copy_multiple_files.SF-2902320.test sql/test/BugTracker-2009/Tests/correlated-selection-bug.test sql/test/BugTracker-2009/Tests/count_bug.SF-2604583.test sql/test/BugTracker-2009/Tests/count_distinct_bug.SF-2826015.test sql/test/BugTracker-2009/Tests/crash_on_complex_join.SF-2847106.test sql/test/BugTracker-2009/Tests/create_table_dup_name.SF-2879005.test sql/test/BugTracker-2009/Tests/decimal_needs_truncation.SF-2605686.test sql/test/BugTracker-2009/Tests/distinct.SF-2546483.test sql/test/BugTracker-2009/Tests/double_count_limit_bug.SF-2862146.test sql/test/BugTracker-2009/Tests/drop-sequence-crash.SF-2854195.test sql/test/BugTracker-2009/Tests/dumping_tables.SF-2776908--performance.test sql/test/BugTracker-2009/Tests/error_while_drop_func_returns_table_type.SF-2604573.test sql/test/BugTracker-2009/Tests/except_error_wrong.SF-2808409.test sql/test/BugTracker-2009/Tests/explain_gives_crash.SF-2741829.test sql/test/BugTracker-2009/Tests/explain_gives_crash.SF-2741829_cleanup.test sql/test/BugTracker-2009/Tests/function_call_not_handled.SF-2864179.test sql/test/BugTracker-2009/Tests/group_by_on_values.SF-2837561.test sql/test/BugTracker-2009/Tests/having_min_crash.SF-2795951.test sql/test/BugTracker-2009/Tests/having_or_bug.test sql/test/BugTracker-2009/Tests/incomplete.SF.2536893.test sql/test/BugTracker-2009/Tests/insert_into_done_by_procedure.SF-2607293.test sql/test/BugTracker-2009/Tests/insert_into_values_bug.SF-2807609.test sql/test/BugTracker-2009/Tests/insert_order_by.SF-2658243.test sql/test/BugTracker-2009/Tests/insert_type_exception.SF-2789976.test sql/test/BugTracker-2009/Tests/join_topn.SF-2654133.test sql/test/BugTracker-2009/Tests/leftjoin_undefined.SF-2879011.test sql/test/BugTracker-2009/Tests/like_bug.SF-2878994.test sql/test/BugTracker-2009/Tests/limit_in_subquery.SF-2620437.test sql/test/BugTracker-2009/Tests/lookup_column_name_bug_1.SF-2654300.test sql/test/BugTracker-2009/Tests/lookup_column_name_bug_2.SF-2656762.test sql/test/BugTracker-2009/Tests/missing_column_name.SF-2776100.test sql/test/BugTracker-2009/Tests/multi-column_join_with_expression.SF-2783279.test sql/test/BugTracker-2009/Tests/name_clash_with_dump.SF-2780395.test sql/test/BugTracker-2009/Tests/not_equal.SF-2678502.test sql/test/BugTracker-2009/Tests/not_invalidtable_crash.SF-2927174.test sql/test/BugTracker-2009/Tests/nullstr.SF-2704016.test sql/test/BugTracker-2009/Tests/number_between_col1_and_col2.test sql/test/BugTracker-2009/Tests/numeric_data_type_bug.SF-2818176.test sql/test/BugTracker-2009/Tests/orIssue.SF-2812504.test sql/test/BugTracker-2009/Tests/order_by_column_position.test sql/test/BugTracker-2009/Tests/order_by_column_position_rel_name_bug.test sql/test/BugTracker-2009/Tests/orderby_with_row_number.SF-2895791.test sql/test/BugTracker-2009/Tests/overflow.SF-2853458.test sql/test/BugTracker-2009/Tests/parallel_bulk-load.SF-2771052.clean.test sql/test/BugTracker-2009/Tests/parallel_bulk-load.SF-2771052.test.test.in sql/test/BugTracker-2009/Tests/pow_operator.SF-2812721.test sql/test/BugTracker-2009/Tests/prepare_commit_execute.SF-2606020.test sql/test/BugTracker-2009/Tests/prepare_decimal_bug.SF-2831994.test sql/test/BugTracker-2009/Tests/primekeyconstraint.SF-2783425.test sql/test/BugTracker-2009/Tests/push-select-div-down.SF-2593341.test sql/test/BugTracker-2009/Tests/push_select_down_crash.test sql/test/BugTracker-2009/Tests/random.SF-2737889.test sql/test/BugTracker-2009/Tests/recursion-problem.SF-2827784.test sql/test/BugTracker-2009/Tests/reorder.SF-2770608.test sql/test/BugTracker-2009/Tests/restart_with_large_int.SF-2846238.test sql/test/BugTracker-2009/Tests/rollback_bug.test sql/test/BugTracker-2009/Tests/rollback_mistake.SF-2814622.test sql/test/BugTracker-2009/Tests/row_number_bug.SF-2546109.test sql/test/BugTracker-2009/Tests/segv_for_unknown_identifier_in_subquery.SF-2874045.test sql/test/BugTracker-2009/Tests/select_X_where_bla_EQ_whatever.SF-282597.test sql/test/BugTracker-2009/Tests/select_from_history.SF-2556566.test sql/test/BugTracker-2009/Tests/semijoin_bug.SF-2869818.test sql/test/BugTracker-2009/Tests/serial_with_order_by_not_working.SF-2585592.test sql/test/BugTracker-2009/Tests/set_and_arg_null.SF-2812729.test sql/test/BugTracker-2009/Tests/subquery_returns_table_crash.SF-2513620.test sql/test/BugTracker-2009/Tests/subtraction_between_two_columns.SF-2582389.test sql/test/BugTracker-2009/Tests/temp_table_fail_leaves_data.SF-2793286.test sql/test/BugTracker-2009/Tests/temporary_table_leftover.SF-2734713.test sql/test/BugTracker-2009/Tests/temporary_table_leftover.SF-2779437.test sql/test/BugTracker-2009/Tests/union_where_combined.SF-2887282.test sql/test/BugTracker-2009/Tests/unique_constraint_on_char.SF-2873564.test sql/test/BugTracker-2009/Tests/update-crash.test sql/test/BugTracker-2009/Tests/updating_non-loaded_columns.SF-2864313_KO-1.test.in sql/test/BugTracker-2009/Tests/updating_non-loaded_columns.SF-2864313_KO-2.test.in sql/test/BugTracker-2009/Tests/updating_non-loaded_columns.SF-2864313_KO-3.test.in sql/test/BugTracker-2009/Tests/updating_non-loaded_columns.SF-2864313_OK-0.test.in sql/test/BugTracker-2009/Tests/updating_non-loaded_columns.SF-2864313_OK-4.test.in sql/test/BugTracker-2009/Tests/use_order_column_first.SF-2686008.test sql/test/BugTracker-2009/Tests/utf8_bug.SF-2822855.test sql/test/BugTracker-2009/Tests/view-except-limit.SF-2798333.test sql/test/BugTracker-2009/Tests/wrong_error_message.SF-2637051.test Modified Files: sql/test/BugTracker-2009/Tests/All Branch: mtest Log Message:
Convert sql/Test/BugTracker-2009 diffs (truncated from 4849 to 300 lines): diff --git a/sql/test/BugTracker-2009/Tests/AVG_ReturnsNoLines.SF-2596084.test b/sql/test/BugTracker-2009/Tests/AVG_ReturnsNoLines.SF-2596084.test new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2009/Tests/AVG_ReturnsNoLines.SF-2596084.test @@ -0,0 +1,107 @@ +statement ok +CREATE TABLE x ( +x DOUBLE +) + + +statement ok +INSERT INTO x VALUES (1) + +statement ok +INSERT INTO x VALUES (2) + +statement ok +INSERT INTO x VALUES (3) + +query RR rowsort +SELECT AVG(x) AS avgx, AVG(x) AS avgx2 +FROM x +---- +2.000 +2.000 + +query RR rowsort +SELECT AVG(x) AS avgx, SUM(x) AS sumx +FROM x +---- +2.000 +6.000 + +query RI rowsort +SELECT AVG(x) AS avgx, COUNT(x) AS countx +FROM x +---- +2.000 +3 + +query RI rowsort +SELECT AVG(x) AS avgx, COUNT(*) AS countstar +FROM x +---- +2.000 +3 + +query RR rowsort +SELECT AVG(x) AS avgx, MIN(x) AS minx +FROM x +---- +2.000 +1.000 + +query RR rowsort +SELECT AVG(x) AS avgx, MAX(x) AS maxx +FROM x +---- +2.000 +3.000 + +query RRRII rowsort +SELECT SUM(x) AS sumx, MIN(x) AS minx, MAX(x) AS maxx, COUNT(x) AS countx, COUNT(*) AS countstar +FROM x +---- +6.000 +1.000 +3.000 +3 +3 + +query IRR rowsort +SELECT COUNT(x) AS n1, sum(x)/count(x) as m1, sqrt( sum(x*x)/count(x) - (sum(x)/count(x))*(sum(x)/count(x)) ) as sd1 +FROM x +---- +3 +2.000 +0.816 + +query IRR rowsort +SELECT MIN(n) AS n2, MIN(m) AS m2, SQRT(SUM((x-m)*(x-m))/MIN(n)) AS sd2 +FROM +( + SELECT AVG(x) AS m, COUNT(x) AS n + FROM x +) pass1 +, x + +---- +3 +2.000 +0.816 + +query IRR rowsort +SELECT COUNT(x) AS n2, MIN(m) AS m2, SQRT(SUM((x-m)*(x-m))/COUNT(x)) AS sd2 +FROM +( + SELECT AVG(x) AS m + FROM x +) agg +, x + +---- +3 +2.000 +0.816 + +statement ok +drop table x + + diff --git a/sql/test/BugTracker-2009/Tests/AVG_of_SQRT.SF-2757642.test b/sql/test/BugTracker-2009/Tests/AVG_of_SQRT.SF-2757642.test new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2009/Tests/AVG_of_SQRT.SF-2757642.test @@ -0,0 +1,7 @@ +query TR rowsort +select 'avg(sqrt(n8)) == 1.1', avg(cast(1.1 as real)) from generate_series(cast(0 as integer), 100000000, 1) +---- +avg(sqrt(n8)) == 1.1 +1.100 + + diff --git a/sql/test/BugTracker-2009/Tests/All b/sql/test/BugTracker-2009/Tests/All --- a/sql/test/BugTracker-2009/Tests/All +++ b/sql/test/BugTracker-2009/Tests/All @@ -2,8 +2,9 @@ # by remains of other tests in case those don't work / clean-up properly. alter_table_drop_constraint.SF-2803477 mclient-lsql-D -alter_table_drop_constraint.SF-2803477_cleanup -# + +# coversion to logic tests (11/2020): Cleanup tests are not needed. +# alter_table_drop_constraint.SF-2803477_cleanup binop.SF.2499537 incomplete.SF.2536893 subquery_returns_table_crash.SF-2513620 @@ -47,7 +48,9 @@ TribooleanFailureWithSubquery.SF-2679434 nullstr.SF-2704016 parallel_bulk-load.SF-2771052.unpack_csv parallel_bulk-load.SF-2771052.test -parallel_bulk-load.SF-2771052.clean + +# coversion to logic tests (11/2020): Cleanup tests are not needed. +# parallel_bulk-load.SF-2771052.clean wrong_error_message.SF-2637051 AVG_of_SQRT.SF-2757642 missing_column_name.SF-2776100 @@ -117,5 +120,7 @@ arithmetic-small-values-null.SF-2921310 # # The following test currently crashes and this fact (or its remains) might # harm sub-sequent tests; hence, this test should be last in this directory. -explain_gives_crash.SF-2741829 -explain_gives_crash.SF-2741829_cleanup + +# coversion to logic tests (11/2020): These tests use explain so we just skip them for now +# explain_gives_crash.SF-2741829 +# explain_gives_crash.SF-2741829_cleanup diff --git a/sql/test/BugTracker-2009/Tests/BOM.SF-2787813.test b/sql/test/BugTracker-2009/Tests/BOM.SF-2787813.test new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2009/Tests/BOM.SF-2787813.test @@ -0,0 +1,4 @@ +statement error +select 1 + + diff --git a/sql/test/BugTracker-2009/Tests/COPY_INTO_char_NULL.SF-2560780.test.in b/sql/test/BugTracker-2009/Tests/COPY_INTO_char_NULL.SF-2560780.test.in new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2009/Tests/COPY_INTO_char_NULL.SF-2560780.test.in @@ -0,0 +1,35 @@ +statement ok +CREATE TABLE a ( +b VARCHAR(50), +c VARCHAR(50) +) + +statement ok +COPY 2 OFFSET 2 RECORDS INTO "a" FROM E'$QTSTSRCDIR/COPY_INTO_char_NULL.SF-2560780.csv' USING DELIMITERS ',', E'\n', '"' + +query TT rowsort +SELECT * FROM a +---- +a +aa +bb +b + +statement ok +COPY 2 OFFSET 2 RECORDS INTO "a" FROM E'$QTSTSRCDIR/COPY_INTO_char_NULL.SF-2560780.csv' USING DELIMITERS ',', E'\n', '"' NULL AS '' + +query TT rowsort +SELECT * FROM a +---- +a +aa +a +aa +bb +b +bb +b + +statement ok +DROP TABLE a + diff --git a/sql/test/BugTracker-2009/Tests/Division_by_zero_error.SF-2791361.test b/sql/test/BugTracker-2009/Tests/Division_by_zero_error.SF-2791361.test new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2009/Tests/Division_by_zero_error.SF-2791361.test @@ -0,0 +1,64 @@ +statement ok +create table test2 (bla1 double, bla2 double) + +statement ok +insert into test2 values (1,1) + +statement ok +insert into test2 values (1,2) + +statement ok +insert into test2 values (1,3) + +query R rowsort +select case when (bla1 - bla2) > 0 then 1/(bla1 - bla2) else 0 end from test2 +---- +0.000 +0.000 +0.000 + +query R rowsort +select case when (bla1 - bla2) > 0 then 1/(bla1 - bla2) else 0 end from test2 +---- +0.000 +0.000 +0.000 + +statement ok +drop table test2 + +statement ok +CREATE TABLE "sys"."nodes_legacy" ( +"id" int, +"long" double, +"lat" double, +"uid" int, +"timestamp" timestamptz(7) +) + +statement ok +CREATE TABLE "sys"."segments" ( +"way" int, +"node1" int, +"node2" int +) + +query RRRRR rowsort +select n1.lat, n1.long, n2.lat, n2.long, case when (n2.lat - n1.lat) > 0 +then (n2.long - n1.long)/(n2.lat - n1.lat) else 0 end from nodes_legacy as +n1, nodes_legacy as n2, segments where node1 = n1.id and node2 = n2.id +limit 10 +---- + +statement ok +drop table "sys"."segments" + +statement ok +drop table "sys"."nodes_legacy" + +query I rowsort +select case when (2 - 2) > 0 then (3 - 2)/(2 - 2) else 0 end as "test" +---- +0 + + diff --git a/sql/test/BugTracker-2009/Tests/Floating_point_exception.SF-2791356.test b/sql/test/BugTracker-2009/Tests/Floating_point_exception.SF-2791356.test new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2009/Tests/Floating_point_exception.SF-2791356.test @@ -0,0 +1,15 @@ +statement ok +create table test2791356 (bla1 int, bla2 int) + +statement ok +insert into test2791356 values (1,1) + +query I rowsort +select case when (bla1 - bla2) > 0 then 1/(bla1 - bla2) else 0 end from test2791356 +---- +0 + +statement ok +drop table test2791356 + + diff --git a/sql/test/BugTracker-2009/Tests/IS_NULL_in_CASE.test b/sql/test/BugTracker-2009/Tests/IS_NULL_in_CASE.test new file mode 100644 _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list