Commit ff7dbba
committed
[yugabyte#25559] YSQL: Fix order in some queries with IN clause
Summary:
It was incorrectly assumed that requests with equality conditions on
all key columns, when those conditions are converted to ybctid, do not
need to keep the row order.
It is true in most cases, basically, because those conditions usually
produce single ybctid, and yield at most one row.
However, there is one exception, when it is not true. If one column's
equality condition is an IN operator, it yields multiple ybctids, which
order may be important.
Fixed by providing the keep_order parameter.
Jira: DB-14813
Test Plan: ./yb_build.sh --java-test org.yb.pgsql.TestPgRegressHashInQueries#schedule
Reviewers: dmitry, telgersma
Reviewed By: telgersma
Subscribers: yql
Tags: #jenkins-ready
Differential Revision: https://phorge.dev.yugabyte.com/D411451 parent c00c7a8 commit ff7dbba
File tree
2 files changed
+19
-19
lines changed- src
- postgres/src/test/regress/expected
- yb/yql/pggate
2 files changed
+19
-19
lines changedLines changed: 18 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
964 | 964 | | |
965 | 965 | | |
966 | 966 | | |
967 | | - | |
968 | | - | |
969 | | - | |
970 | 967 | | |
971 | 968 | | |
972 | 969 | | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
973 | 973 | | |
974 | 974 | | |
975 | 975 | | |
| |||
978 | 978 | | |
979 | 979 | | |
980 | 980 | | |
981 | | - | |
982 | | - | |
983 | | - | |
984 | 981 | | |
985 | 982 | | |
986 | 983 | | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
987 | 987 | | |
988 | 988 | | |
989 | 989 | | |
| |||
1003 | 1003 | | |
1004 | 1004 | | |
1005 | 1005 | | |
1006 | | - | |
1007 | | - | |
1008 | | - | |
1009 | 1006 | | |
1010 | 1007 | | |
1011 | 1008 | | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
1012 | 1012 | | |
1013 | 1013 | | |
1014 | 1014 | | |
| |||
1025 | 1025 | | |
1026 | 1026 | | |
1027 | 1027 | | |
1028 | | - | |
1029 | | - | |
1030 | | - | |
1031 | 1028 | | |
1032 | 1029 | | |
1033 | 1030 | | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
1034 | 1034 | | |
1035 | 1035 | | |
1036 | 1036 | | |
| |||
1061 | 1061 | | |
1062 | 1062 | | |
1063 | 1063 | | |
1064 | | - | |
1065 | | - | |
1066 | | - | |
1067 | 1064 | | |
1068 | 1065 | | |
1069 | 1066 | | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
1070 | 1070 | | |
1071 | 1071 | | |
1072 | 1072 | | |
| |||
1083 | 1083 | | |
1084 | 1084 | | |
1085 | 1085 | | |
1086 | | - | |
1087 | | - | |
1088 | | - | |
1089 | 1086 | | |
1090 | 1087 | | |
1091 | 1088 | | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
1092 | 1092 | | |
1093 | 1093 | | |
1094 | 1094 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
721 | 721 | | |
722 | 722 | | |
723 | 723 | | |
724 | | - | |
| 724 | + | |
725 | 725 | | |
726 | 726 | | |
727 | 727 | | |
| |||
0 commit comments