@@ -874,14 +874,14 @@ SELECT * FROM inv@i WHERE b @> '{"x": "y"}' AND c = 'baz'
874
874
query T kvtrace
875
875
INSERT INTO inv VALUES (1, '{"x": "y", "num": 1}', 'foo')
876
876
----
877
- CPut /Table/107/1/1/0 -> /TUPLE/
877
+ CPut /Table/107/1/1/0 -> /TUPLE/2:2:SentinelType/{"num": 1, "x": "y"}/1:3:Bytes/foo
878
878
CPut /Table/107/2/"num"/1/1/0 -> /BYTES/
879
879
CPut /Table/107/2/"x"/"y"/1/0 -> /BYTES/
880
880
881
881
query T kvtrace
882
882
INSERT INTO inv VALUES (2, '{"x": "y", "num": 2}', 'baz')
883
883
----
884
- CPut /Table/107/1/2/0 -> /TUPLE/
884
+ CPut /Table/107/1/2/0 -> /TUPLE/2:2:SentinelType/{"num": 2, "x": "y"}/1:3:Bytes/baz
885
885
886
886
# ---------------------------------------------------------
887
887
# DELETE partial inverted index
@@ -914,14 +914,14 @@ query T kvtrace
914
914
UPDATE inv SET c = 'bar' WHERE a = 1
915
915
----
916
916
Scan /Table/107/1/1/0 lock Exclusive (Block, Unreplicated)
917
- Put /Table/107/1/1/0 -> /TUPLE/
917
+ Put /Table/107/1/1/0 -> /TUPLE/2:2:SentinelType/{"num": 1, "x": "y"}/1:3:Bytes/bar
918
918
919
919
# Update the JSON of a row in the partial index.
920
920
query T kvtrace
921
921
UPDATE inv SET b = '{"x": "y", "num": 3}' WHERE a = 1
922
922
----
923
923
Scan /Table/107/1/1/0 lock Exclusive (Block, Unreplicated)
924
- Put /Table/107/1/1/0 -> /TUPLE/
924
+ Put /Table/107/1/1/0 -> /TUPLE/2:2:SentinelType/{"num": 3, "x": "y"}/1:3:Bytes/bar
925
925
Del /Table/107/2/"num"/1/1/0
926
926
CPut /Table/107/2/"num"/3/1/0 -> /BYTES/
927
927
@@ -930,7 +930,7 @@ query T kvtrace
930
930
UPDATE inv SET c = 'fud' WHERE a = 1
931
931
----
932
932
Scan /Table/107/1/1/0 lock Exclusive (Block, Unreplicated)
933
- Put /Table/107/1/1/0 -> /TUPLE/
933
+ Put /Table/107/1/1/0 -> /TUPLE/2:2:SentinelType/{"num": 3, "x": "y"}/1:3:Bytes/fud
934
934
Del /Table/107/2/"num"/3/1/0
935
935
Del /Table/107/2/"x"/"y"/1/0
936
936
@@ -939,21 +939,21 @@ query T kvtrace
939
939
UPDATE inv SET c = 'boo' WHERE a = 2
940
940
----
941
941
Scan /Table/107/1/2/0 lock Exclusive (Block, Unreplicated)
942
- Put /Table/107/1/2/0 -> /TUPLE/
942
+ Put /Table/107/1/2/0 -> /TUPLE/2:2:SentinelType/{"num": 2, "x": "y"}/1:3:Bytes/boo
943
943
944
944
# Update the JSON of a row not in the partial index.
945
945
query T kvtrace
946
946
UPDATE inv SET b = '{"x": "y", "num": 4}' WHERE a = 2
947
947
----
948
948
Scan /Table/107/1/2/0 lock Exclusive (Block, Unreplicated)
949
- Put /Table/107/1/2/0 -> /TUPLE/
949
+ Put /Table/107/1/2/0 -> /TUPLE/2:2:SentinelType/{"num": 4, "x": "y"}/1:3:Bytes/boo
950
950
951
951
# Update a non-JSON column so that the row is added to the partial index.
952
952
query T kvtrace
953
953
UPDATE inv SET c = 'bar' WHERE a = 2
954
954
----
955
955
Scan /Table/107/1/2/0 lock Exclusive (Block, Unreplicated)
956
- Put /Table/107/1/2/0 -> /TUPLE/
956
+ Put /Table/107/1/2/0 -> /TUPLE/2:2:SentinelType/{"num": 4, "x": "y"}/1:3:Bytes/bar
957
957
CPut /Table/107/2/"num"/4/2/0 -> /BYTES/
958
958
CPut /Table/107/2/"x"/"y"/2/0 -> /BYTES/
959
959
@@ -965,7 +965,7 @@ Scan /Table/107/1/2/0 lock Exclusive (Block, Unreplicated)
965
965
Del /Table/107/2/"num"/4/2/0
966
966
Del /Table/107/2/"x"/"y"/2/0
967
967
Del /Table/107/1/2/0
968
- CPut /Table/107/1/4/0 -> /TUPLE/
968
+ CPut /Table/107/1/4/0 -> /TUPLE/2:2:SentinelType/{"num": 4, "x": "y"}/1:3:Bytes/bar
969
969
CPut /Table/107/2/"num"/4/4/0 -> /BYTES/
970
970
CPut /Table/107/2/"x"/"y"/4/0 -> /BYTES/
971
971
@@ -975,7 +975,7 @@ UPDATE inv SET a = 3 WHERE a = 1
975
975
----
976
976
Scan /Table/107/1/1/0 lock Exclusive (Block, Unreplicated)
977
977
Del /Table/107/1/1/0
978
- CPut /Table/107/1/3/0 -> /TUPLE/
978
+ CPut /Table/107/1/3/0 -> /TUPLE/2:2:SentinelType/{"num": 3, "x": "y"}/1:3:Bytes/fud
979
979
980
980
# Update to multiple rows (one in and one not in the partial index) so that both
981
981
# are in the partial index.
@@ -986,8 +986,8 @@ query T kvtrace
986
986
UPDATE inv SET c = 'foo' WHERE a IN (10, 11)
987
987
----
988
988
Scan /Table/107/1/1{0-2} lock Exclusive (Block, Unreplicated)
989
- Put /Table/107/1/10/0 -> /TUPLE/
990
- Put /Table/107/1/11/0 -> /TUPLE/
989
+ Put /Table/107/1/10/0 -> /TUPLE/2:2:SentinelType/{"a": "b"}/1:3:Bytes/foo
990
+ Put /Table/107/1/11/0 -> /TUPLE/2:2:SentinelType/{"a": "b"}/1:3:Bytes/foo
991
991
CPut /Table/107/2/"a"/"b"/11/0 -> /BYTES/
992
992
993
993
# Update to multiple rows (one in and one not in the partial index) so that both
@@ -999,9 +999,9 @@ query T kvtrace
999
999
UPDATE inv SET c = 'fud' WHERE a IN (12, 13)
1000
1000
----
1001
1001
Scan /Table/107/1/1{2-4} lock Exclusive (Block, Unreplicated)
1002
- Put /Table/107/1/12/0 -> /TUPLE/
1002
+ Put /Table/107/1/12/0 -> /TUPLE/2:2:SentinelType/{"a": "b"}/1:3:Bytes/fud
1003
1003
Del /Table/107/2/"a"/"b"/12/0
1004
- Put /Table/107/1/13/0 -> /TUPLE/
1004
+ Put /Table/107/1/13/0 -> /TUPLE/2:2:SentinelType/{"a": "b"}/1:3:Bytes/fud
1005
1005
1006
1006
# ---------------------------------------------------------
1007
1007
# UPSERT partial inverted index
@@ -1013,15 +1013,15 @@ query T kvtrace
1013
1013
UPSERT INTO inv VALUES (4, '{"x": "y", "num": 4}', 'foo')
1014
1014
----
1015
1015
Scan /Table/107/1/4/0 lock Exclusive (Block, Unreplicated)
1016
- Put /Table/107/1/4/0 -> /TUPLE/
1016
+ Put /Table/107/1/4/0 -> /TUPLE/2:2:SentinelType/{"num": 4, "x": "y"}/1:3:Bytes/foo
1017
1017
1018
1018
# Upsert a conflicting row with different JSON from the existing row in the
1019
1019
# partial index.
1020
1020
query T kvtrace
1021
1021
UPSERT INTO inv VALUES (4, '{"x": "y", "num": 6}', 'foo')
1022
1022
----
1023
1023
Scan /Table/107/1/4/0 lock Exclusive (Block, Unreplicated)
1024
- Put /Table/107/1/4/0 -> /TUPLE/
1024
+ Put /Table/107/1/4/0 -> /TUPLE/2:2:SentinelType/{"num": 6, "x": "y"}/1:3:Bytes/foo
1025
1025
Del /Table/107/2/"num"/4/4/0
1026
1026
CPut /Table/107/2/"num"/6/4/0 -> /BYTES/
1027
1027
@@ -1030,7 +1030,7 @@ query T kvtrace
1030
1030
UPSERT INTO inv VALUES (4, '{"x": "y", "num": 6}', 'fud')
1031
1031
----
1032
1032
Scan /Table/107/1/4/0 lock Exclusive (Block, Unreplicated)
1033
- Put /Table/107/1/4/0 -> /TUPLE/
1033
+ Put /Table/107/1/4/0 -> /TUPLE/2:2:SentinelType/{"num": 6, "x": "y"}/1:3:Bytes/fud
1034
1034
Del /Table/107/2/"num"/6/4/0
1035
1035
Del /Table/107/2/"x"/"y"/4/0
1036
1036
@@ -1039,7 +1039,7 @@ query T kvtrace
1039
1039
UPSERT INTO inv VALUES (5, '{"x": "y", "num": 7}', 'bar')
1040
1040
----
1041
1041
Scan /Table/107/1/5/0 lock Exclusive (Block, Unreplicated)
1042
- CPut /Table/107/1/5/0 -> /TUPLE/
1042
+ CPut /Table/107/1/5/0 -> /TUPLE/2:2:SentinelType/{"num": 7, "x": "y"}/1:3:Bytes/bar
1043
1043
CPut /Table/107/2/"num"/7/5/0 -> /BYTES/
1044
1044
CPut /Table/107/2/"x"/"y"/5/0 -> /BYTES/
1045
1045
@@ -1048,7 +1048,7 @@ query T kvtrace
1048
1048
UPSERT INTO inv VALUES (6, '{"x": "y", "num": 8}', 'baz')
1049
1049
----
1050
1050
Scan /Table/107/1/6/0 lock Exclusive (Block, Unreplicated)
1051
- CPut /Table/107/1/6/0 -> /TUPLE/
1051
+ CPut /Table/107/1/6/0 -> /TUPLE/2:2:SentinelType/{"num": 8, "x": "y"}/1:3:Bytes/baz
1052
1052
1053
1053
# Regression test for #57085. Cascading DELETEs should not issue DEL operations
1054
1054
# for partial indexes of a child table when the deleted row was not in the
0 commit comments