Browse Source

fix test: add missed order by in query

gvit 2 years ago
parent
commit
ec75c3fc29

+ 10 - 3
ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_5.plan

@@ -19,17 +19,18 @@
                         "PlanNodeId": 11,
                         "Plans": [
                             {
-                                "Node Type": "UnionAll",
+                                "Node Type": "Merge",
                                 "PlanNodeId": 10,
                                 "PlanNodeType": "Connection",
                                 "Plans": [
                                     {
                                         "CTE Name": "tx_result_binding_2_0",
-                                        "Node Type": "Limit-InnerJoin (MapJoin)-Filter-TablePointLookup-ConstantExpr",
+                                        "Node Type": "TopSort-InnerJoin (MapJoin)-Filter-TablePointLookup-ConstantExpr",
                                         "Operators": [
                                             {
                                                 "Limit": "1001",
-                                                "Name": "Limit"
+                                                "Name": "TopSort",
+                                                "TopSortBy": ""
                                             },
                                             {
                                                 "Name": "InnerJoin (MapJoin)"
@@ -56,6 +57,12 @@
                                             "postgres_jointest/join1.test_plan/J2_TBL"
                                         ]
                                     }
+                                ],
+                                "SortColumns": [
+                                    "i (Asc)",
+                                    "j (Asc)",
+                                    "t (Asc)",
+                                    "k (Asc)"
                                 ]
                             }
                         ]

+ 16 - 16
ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_results-jointest_join1.test_/query_10

@@ -2,49 +2,49 @@
     {
         "i": null,
         "j": null,
-        "t": null,
-        "k": null
+        "k": null,
+        "t": null
     },
     {
         "i": null,
         "j": null,
-        "t": null,
-        "k": 0
+        "k": 0,
+        "t": null
     },
     {
         "i": 0,
         "j": null,
-        "t": "zero",
-        "k": null
+        "k": null,
+        "t": "zero"
     },
     {
         "i": 1,
         "j": 4,
-        "t": "one",
-        "k": -1
+        "k": -1,
+        "t": "one"
     },
     {
         "i": 2,
         "j": 3,
-        "t": "two",
-        "k": 2
+        "k": 2,
+        "t": "two"
     },
     {
         "i": 2,
         "j": 3,
-        "t": "two",
-        "k": 4
+        "k": 4,
+        "t": "two"
     },
     {
         "i": 3,
         "j": 2,
-        "t": "three",
-        "k": -3
+        "k": -3,
+        "t": "three"
     },
     {
         "i": 5,
         "j": 0,
-        "t": "five",
-        "k": -5
+        "k": -5,
+        "t": "five"
     }
 ]

+ 28 - 28
ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_results-jointest_join1.test_/query_11

@@ -2,85 +2,85 @@
     {
         "i": null,
         "j": null,
-        "t": null,
-        "k": null
+        "k": null,
+        "t": null
     },
     {
         "i": null,
         "j": null,
-        "t": "null",
-        "k": null
+        "k": null,
+        "t": "null"
     },
     {
         "i": null,
         "j": 0,
-        "t": "zero",
-        "k": null
+        "k": null,
+        "t": "zero"
     },
     {
         "i": null,
         "j": null,
-        "t": null,
-        "k": 0
+        "k": 0,
+        "t": null
     },
     {
         "i": 0,
         "j": null,
-        "t": "zero",
-        "k": null
+        "k": null,
+        "t": "zero"
     },
     {
         "i": 1,
         "j": 4,
-        "t": "one",
-        "k": -1
+        "k": -1,
+        "t": "one"
     },
     {
         "i": 2,
         "j": 3,
-        "t": "two",
-        "k": 2
+        "k": 2,
+        "t": "two"
     },
     {
         "i": 2,
         "j": 3,
-        "t": "two",
-        "k": 4
+        "k": 4,
+        "t": "two"
     },
     {
         "i": 3,
         "j": 2,
-        "t": "three",
-        "k": -3
+        "k": -3,
+        "t": "three"
     },
     {
         "i": 4,
         "j": 1,
-        "t": "four",
-        "k": null
+        "k": null,
+        "t": "four"
     },
     {
         "i": 5,
         "j": 0,
-        "t": "five",
-        "k": -5
+        "k": -5,
+        "t": "five"
     },
     {
         "i": 6,
         "j": 6,
-        "t": "six",
-        "k": null
+        "k": null,
+        "t": "six"
     },
     {
         "i": 7,
         "j": 7,
-        "t": "seven",
-        "k": null
+        "k": null,
+        "t": "seven"
     },
     {
         "i": 8,
         "j": 8,
-        "t": "eight",
-        "k": null
+        "k": null,
+        "t": "eight"
     }
 ]

+ 28 - 28
ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_results-jointest_join1.test_/query_12

@@ -2,85 +2,85 @@
     {
         "i": null,
         "j": null,
-        "t": null,
-        "k": null
+        "k": null,
+        "t": null
     },
     {
         "i": null,
         "j": null,
-        "t": "null",
-        "k": null
+        "k": null,
+        "t": "null"
     },
     {
         "i": null,
         "j": 0,
-        "t": "zero",
-        "k": null
+        "k": null,
+        "t": "zero"
     },
     {
         "i": null,
         "j": null,
-        "t": null,
-        "k": 0
+        "k": 0,
+        "t": null
     },
     {
         "i": 0,
         "j": null,
-        "t": "zero",
-        "k": null
+        "k": null,
+        "t": "zero"
     },
     {
         "i": 1,
         "j": 4,
-        "t": "one",
-        "k": -1
+        "k": -1,
+        "t": "one"
     },
     {
         "i": 2,
         "j": 3,
-        "t": "two",
-        "k": 2
+        "k": 2,
+        "t": "two"
     },
     {
         "i": 2,
         "j": 3,
-        "t": "two",
-        "k": 4
+        "k": 4,
+        "t": "two"
     },
     {
         "i": 3,
         "j": 2,
-        "t": "three",
-        "k": -3
+        "k": -3,
+        "t": "three"
     },
     {
         "i": 4,
         "j": 1,
-        "t": "four",
-        "k": null
+        "k": null,
+        "t": "four"
     },
     {
         "i": 5,
         "j": 0,
-        "t": "five",
-        "k": -5
+        "k": -5,
+        "t": "five"
     },
     {
         "i": 6,
         "j": 6,
-        "t": "six",
-        "k": null
+        "k": null,
+        "t": "six"
     },
     {
         "i": 7,
         "j": 7,
-        "t": "seven",
-        "k": null
+        "k": null,
+        "t": "seven"
     },
     {
         "i": 8,
         "j": 8,
-        "t": "eight",
-        "k": null
+        "k": null,
+        "t": "eight"
     }
 ]

+ 2 - 2
ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_results-jointest_join1.test_/query_14

@@ -2,7 +2,7 @@
     {
         "i": 1,
         "j": 4,
-        "t": "one",
-        "k": -1
+        "k": -1,
+        "t": "one"
     }
 ]

+ 12 - 12
ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_results-jointest_join1.test_/query_2

@@ -2,37 +2,37 @@
     {
         "i": 0,
         "j": null,
-        "t": "zero",
-        "k": null
+        "k": null,
+        "t": "zero"
     },
     {
         "i": 1,
         "j": 4,
-        "t": "one",
-        "k": -1
+        "k": -1,
+        "t": "one"
     },
     {
         "i": 2,
         "j": 3,
-        "t": "two",
-        "k": 2
+        "k": 2,
+        "t": "two"
     },
     {
         "i": 2,
         "j": 3,
-        "t": "two",
-        "k": 4
+        "k": 4,
+        "t": "two"
     },
     {
         "i": 3,
         "j": 2,
-        "t": "three",
-        "k": -3
+        "k": -3,
+        "t": "three"
     },
     {
         "i": 5,
         "j": 0,
-        "t": "five",
-        "k": -5
+        "k": -5,
+        "t": "five"
     }
 ]

+ 12 - 12
ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_results-jointest_join1.test_/query_3

@@ -2,37 +2,37 @@
     {
         "i": 0,
         "j": null,
-        "t": "zero",
-        "k": null
+        "k": null,
+        "t": "zero"
     },
     {
         "i": 1,
         "j": 4,
-        "t": "one",
-        "k": -1
+        "k": -1,
+        "t": "one"
     },
     {
         "i": 2,
         "j": 3,
-        "t": "two",
-        "k": 2
+        "k": 2,
+        "t": "two"
     },
     {
         "i": 2,
         "j": 3,
-        "t": "two",
-        "k": 4
+        "k": 4,
+        "t": "two"
     },
     {
         "i": 3,
         "j": 2,
-        "t": "three",
-        "k": -3
+        "k": -3,
+        "t": "three"
     },
     {
         "i": 5,
         "j": 0,
-        "t": "five",
-        "k": -5
+        "k": -5,
+        "t": "five"
     }
 ]

+ 12 - 12
ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_results-jointest_join1.test_/query_4

@@ -1,26 +1,26 @@
 [
     {
-        "b": 0,
         "a": null,
-        "c": "zero",
-        "a2": null
+        "a2": null,
+        "b": 0,
+        "c": "zero"
     },
     {
-        "b": 0,
         "a": 5,
-        "c": "five",
-        "a2": null
+        "a2": null,
+        "b": 0,
+        "c": "five"
     },
     {
-        "b": 2,
         "a": 3,
-        "c": "three",
-        "a2": 2
+        "a2": 2,
+        "b": 2,
+        "c": "three"
     },
     {
-        "b": 4,
         "a": 1,
-        "c": "one",
-        "a2": 2
+        "a2": 2,
+        "b": 4,
+        "c": "one"
     }
 ]

+ 12 - 12
ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_results-jointest_join1.test_/query_5

@@ -2,37 +2,37 @@
     {
         "i": 0,
         "j": null,
-        "t": "zero",
-        "k": null
+        "k": null,
+        "t": "zero"
     },
     {
         "i": 1,
         "j": 4,
-        "t": "one",
-        "k": -1
+        "k": -1,
+        "t": "one"
     },
     {
         "i": 2,
         "j": 3,
-        "t": "two",
-        "k": 2
+        "k": 2,
+        "t": "two"
     },
     {
         "i": 2,
         "j": 3,
-        "t": "two",
-        "k": 4
+        "k": 4,
+        "t": "two"
     },
     {
         "i": 3,
         "j": 2,
-        "t": "three",
-        "k": -3
+        "k": -3,
+        "t": "three"
     },
     {
         "i": 5,
         "j": 0,
-        "t": "five",
-        "k": -5
+        "k": -5,
+        "t": "five"
     }
 ]

+ 6 - 6
ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_results-jointest_join1.test_/query_6

@@ -2,19 +2,19 @@
     {
         "i": 0,
         "j": null,
-        "t": "zero",
-        "k": 0
+        "k": 0,
+        "t": "zero"
     },
     {
         "i": 2,
         "j": 3,
-        "t": "two",
-        "k": 2
+        "k": 2,
+        "t": "two"
     },
     {
         "i": 4,
         "j": 1,
-        "t": "four",
-        "k": 4
+        "k": 4,
+        "t": "four"
     }
 ]

Some files were not shown because too many files changed in this diff