Skip to content

Commit

Permalink
postgres: add btree index tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Safonov committed Oct 31, 2022
1 parent 3c7ed5d commit 7fd4109
Show file tree
Hide file tree
Showing 15 changed files with 760 additions and 0 deletions.
Binary file not shown.
41 changes: 41 additions & 0 deletions format/postgres/testdata/flavours/pgpro10/16401_1.fqtest
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
$ fq -d pg_btree ".[1].pd_linp[0,1,2,3,4,5,6,7,8,9] | dv" 16401
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.[1].pd_linp[0]{}: item_id 0x2018-0x201b.7 (4)
0x2010| 00 89 20 00 | .. . | lp_off: 2304 0x2018-0x201b.7 (4)
0x2010| 00 89 20 00 | .. . | lp_flags: "LP_NORMAL" (1) 0x2018-0x201b.7 (4)
0x2010| 00 89 20 00 | .. . | lp_len: 16 0x2018-0x201b.7 (4)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.[1].pd_linp[1]{}: item_id 0x201c-0x201f.7 (4)
0x2010| e0 9f 20 00| .. .| lp_off: 8160 0x201c-0x201f.7 (4)
0x2010| e0 9f 20 00| .. .| lp_flags: "LP_NORMAL" (1) 0x201c-0x201f.7 (4)
0x2010| e0 9f 20 00| .. .| lp_len: 16 0x201c-0x201f.7 (4)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.[1].pd_linp[2]{}: item_id 0x2020-0x2023.7 (4)
0x2020|d0 9f 20 00 |.. . | lp_off: 8144 0x2020-0x2023.7 (4)
0x2020|d0 9f 20 00 |.. . | lp_flags: "LP_NORMAL" (1) 0x2020-0x2023.7 (4)
0x2020|d0 9f 20 00 |.. . | lp_len: 16 0x2020-0x2023.7 (4)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.[1].pd_linp[3]{}: item_id 0x2024-0x2027.7 (4)
0x2020| c0 9f 20 00 | .. . | lp_off: 8128 0x2024-0x2027.7 (4)
0x2020| c0 9f 20 00 | .. . | lp_flags: "LP_NORMAL" (1) 0x2024-0x2027.7 (4)
0x2020| c0 9f 20 00 | .. . | lp_len: 16 0x2024-0x2027.7 (4)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.[1].pd_linp[4]{}: item_id 0x2028-0x202b.7 (4)
0x2020| b0 9f 20 00 | .. . | lp_off: 8112 0x2028-0x202b.7 (4)
0x2020| b0 9f 20 00 | .. . | lp_flags: "LP_NORMAL" (1) 0x2028-0x202b.7 (4)
0x2020| b0 9f 20 00 | .. . | lp_len: 16 0x2028-0x202b.7 (4)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.[1].pd_linp[5]{}: item_id 0x202c-0x202f.7 (4)
0x2020| a0 9f 20 00| .. .| lp_off: 8096 0x202c-0x202f.7 (4)
0x2020| a0 9f 20 00| .. .| lp_flags: "LP_NORMAL" (1) 0x202c-0x202f.7 (4)
0x2020| a0 9f 20 00| .. .| lp_len: 16 0x202c-0x202f.7 (4)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.[1].pd_linp[6]{}: item_id 0x2030-0x2033.7 (4)
0x2030|90 9f 20 00 |.. . | lp_off: 8080 0x2030-0x2033.7 (4)
0x2030|90 9f 20 00 |.. . | lp_flags: "LP_NORMAL" (1) 0x2030-0x2033.7 (4)
0x2030|90 9f 20 00 |.. . | lp_len: 16 0x2030-0x2033.7 (4)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.[1].pd_linp[7]{}: item_id 0x2034-0x2037.7 (4)
0x2030| 80 9f 20 00 | .. . | lp_off: 8064 0x2034-0x2037.7 (4)
0x2030| 80 9f 20 00 | .. . | lp_flags: "LP_NORMAL" (1) 0x2034-0x2037.7 (4)
0x2030| 80 9f 20 00 | .. . | lp_len: 16 0x2034-0x2037.7 (4)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.[1].pd_linp[8]{}: item_id 0x2038-0x203b.7 (4)
0x2030| 70 9f 20 00 | p. . | lp_off: 8048 0x2038-0x203b.7 (4)
0x2030| 70 9f 20 00 | p. . | lp_flags: "LP_NORMAL" (1) 0x2038-0x203b.7 (4)
0x2030| 70 9f 20 00 | p. . | lp_len: 16 0x2038-0x203b.7 (4)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.[1].pd_linp[9]{}: item_id 0x203c-0x203f.7 (4)
0x2030| 60 9f 20 00| `. .| lp_off: 8032 0x203c-0x203f.7 (4)
0x2030| 60 9f 20 00| `. .| lp_flags: "LP_NORMAL" (1) 0x203c-0x203f.7 (4)
0x2030| 60 9f 20 00| `. .| lp_len: 16 0x203c-0x203f.7 (4)
111 changes: 111 additions & 0 deletions format/postgres/testdata/flavours/pgpro10/16401_2.fqtest
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
$ fq -d pg_btree ".[1].tuples[0,1,2,3,4,5,6,7,8,9] | dv" 16401
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.[1].tuples[0]{}: tuple 0x2900-0x290f.7 (16)
| | | index_tuple_data{}: 0x2900-0x290f.7 (16)
| | | t_tid{}: 0x2900-0x2905.7 (6)
0x2900|00 00 06 00 |.... | ip_blkid: 393216 0x2900-0x2903.7 (4)
0x2900| 01 00 | .. | ip_posid: 1 0x2904-0x2905.7 (2)
0x2900| 10 00 | .. | t_info: 16 0x2906-0x2907.7 (2)
| | | flags{}: 0x2908-NA (0)
| | | has_nulls: false 0x2908-NA (0)
| | | has_var_widths: false 0x2908-NA (0)
| | | size: 16 0x2908-NA (0)
0x2900| 6f 01 00 00 00 00 00 00| o.......| data: raw bits 0x2908-0x290f.7 (8)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.[1].tuples[1]{}: tuple 0x3fe0-0x3fef.7 (16)
| | | index_tuple_data{}: 0x3fe0-0x3fef.7 (16)
| | | t_tid{}: 0x3fe0-0x3fe5.7 (6)
0x3fe0|00 00 00 00 |.... | ip_blkid: 0 0x3fe0-0x3fe3.7 (4)
0x3fe0| 01 00 | .. | ip_posid: 1 0x3fe4-0x3fe5.7 (2)
0x3fe0| 10 00 | .. | t_info: 16 0x3fe6-0x3fe7.7 (2)
| | | flags{}: 0x3fe8-NA (0)
| | | has_nulls: false 0x3fe8-NA (0)
| | | has_var_widths: false 0x3fe8-NA (0)
| | | size: 16 0x3fe8-NA (0)
0x3fe0| 01 00 00 00 00 00 00 00| ........| data: raw bits 0x3fe8-0x3fef.7 (8)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.[1].tuples[2]{}: tuple 0x3fd0-0x3fdf.7 (16)
| | | index_tuple_data{}: 0x3fd0-0x3fdf.7 (16)
| | | t_tid{}: 0x3fd0-0x3fd5.7 (6)
0x3fd0|00 00 00 00 |.... | ip_blkid: 0 0x3fd0-0x3fd3.7 (4)
0x3fd0| 02 00 | .. | ip_posid: 2 0x3fd4-0x3fd5.7 (2)
0x3fd0| 10 00 | .. | t_info: 16 0x3fd6-0x3fd7.7 (2)
| | | flags{}: 0x3fd8-NA (0)
| | | has_nulls: false 0x3fd8-NA (0)
| | | has_var_widths: false 0x3fd8-NA (0)
| | | size: 16 0x3fd8-NA (0)
0x3fd0| 02 00 00 00 00 00 00 00| ........| data: raw bits 0x3fd8-0x3fdf.7 (8)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.[1].tuples[3]{}: tuple 0x3fc0-0x3fcf.7 (16)
| | | index_tuple_data{}: 0x3fc0-0x3fcf.7 (16)
| | | t_tid{}: 0x3fc0-0x3fc5.7 (6)
0x3fc0|00 00 00 00 |.... | ip_blkid: 0 0x3fc0-0x3fc3.7 (4)
0x3fc0| 03 00 | .. | ip_posid: 3 0x3fc4-0x3fc5.7 (2)
0x3fc0| 10 00 | .. | t_info: 16 0x3fc6-0x3fc7.7 (2)
| | | flags{}: 0x3fc8-NA (0)
| | | has_nulls: false 0x3fc8-NA (0)
| | | has_var_widths: false 0x3fc8-NA (0)
| | | size: 16 0x3fc8-NA (0)
0x3fc0| 03 00 00 00 00 00 00 00| ........| data: raw bits 0x3fc8-0x3fcf.7 (8)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.[1].tuples[4]{}: tuple 0x3fb0-0x3fbf.7 (16)
| | | index_tuple_data{}: 0x3fb0-0x3fbf.7 (16)
| | | t_tid{}: 0x3fb0-0x3fb5.7 (6)
0x3fb0|00 00 00 00 |.... | ip_blkid: 0 0x3fb0-0x3fb3.7 (4)
0x3fb0| 04 00 | .. | ip_posid: 4 0x3fb4-0x3fb5.7 (2)
0x3fb0| 10 00 | .. | t_info: 16 0x3fb6-0x3fb7.7 (2)
| | | flags{}: 0x3fb8-NA (0)
| | | has_nulls: false 0x3fb8-NA (0)
| | | has_var_widths: false 0x3fb8-NA (0)
| | | size: 16 0x3fb8-NA (0)
0x3fb0| 04 00 00 00 00 00 00 00| ........| data: raw bits 0x3fb8-0x3fbf.7 (8)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.[1].tuples[5]{}: tuple 0x3fa0-0x3faf.7 (16)
| | | index_tuple_data{}: 0x3fa0-0x3faf.7 (16)
| | | t_tid{}: 0x3fa0-0x3fa5.7 (6)
0x3fa0|00 00 00 00 |.... | ip_blkid: 0 0x3fa0-0x3fa3.7 (4)
0x3fa0| 05 00 | .. | ip_posid: 5 0x3fa4-0x3fa5.7 (2)
0x3fa0| 10 00 | .. | t_info: 16 0x3fa6-0x3fa7.7 (2)
| | | flags{}: 0x3fa8-NA (0)
| | | has_nulls: false 0x3fa8-NA (0)
| | | has_var_widths: false 0x3fa8-NA (0)
| | | size: 16 0x3fa8-NA (0)
0x3fa0| 05 00 00 00 00 00 00 00| ........| data: raw bits 0x3fa8-0x3faf.7 (8)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.[1].tuples[6]{}: tuple 0x3f90-0x3f9f.7 (16)
| | | index_tuple_data{}: 0x3f90-0x3f9f.7 (16)
| | | t_tid{}: 0x3f90-0x3f95.7 (6)
0x3f90|00 00 00 00 |.... | ip_blkid: 0 0x3f90-0x3f93.7 (4)
0x3f90| 06 00 | .. | ip_posid: 6 0x3f94-0x3f95.7 (2)
0x3f90| 10 00 | .. | t_info: 16 0x3f96-0x3f97.7 (2)
| | | flags{}: 0x3f98-NA (0)
| | | has_nulls: false 0x3f98-NA (0)
| | | has_var_widths: false 0x3f98-NA (0)
| | | size: 16 0x3f98-NA (0)
0x3f90| 06 00 00 00 00 00 00 00| ........| data: raw bits 0x3f98-0x3f9f.7 (8)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.[1].tuples[7]{}: tuple 0x3f80-0x3f8f.7 (16)
| | | index_tuple_data{}: 0x3f80-0x3f8f.7 (16)
| | | t_tid{}: 0x3f80-0x3f85.7 (6)
0x3f80|00 00 00 00 |.... | ip_blkid: 0 0x3f80-0x3f83.7 (4)
0x3f80| 07 00 | .. | ip_posid: 7 0x3f84-0x3f85.7 (2)
0x3f80| 10 00 | .. | t_info: 16 0x3f86-0x3f87.7 (2)
| | | flags{}: 0x3f88-NA (0)
| | | has_nulls: false 0x3f88-NA (0)
| | | has_var_widths: false 0x3f88-NA (0)
| | | size: 16 0x3f88-NA (0)
0x3f80| 07 00 00 00 00 00 00 00| ........| data: raw bits 0x3f88-0x3f8f.7 (8)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.[1].tuples[8]{}: tuple 0x3f70-0x3f7f.7 (16)
| | | index_tuple_data{}: 0x3f70-0x3f7f.7 (16)
| | | t_tid{}: 0x3f70-0x3f75.7 (6)
0x3f70|00 00 00 00 |.... | ip_blkid: 0 0x3f70-0x3f73.7 (4)
0x3f70| 08 00 | .. | ip_posid: 8 0x3f74-0x3f75.7 (2)
0x3f70| 10 00 | .. | t_info: 16 0x3f76-0x3f77.7 (2)
| | | flags{}: 0x3f78-NA (0)
| | | has_nulls: false 0x3f78-NA (0)
| | | has_var_widths: false 0x3f78-NA (0)
| | | size: 16 0x3f78-NA (0)
0x3f70| 08 00 00 00 00 00 00 00| ........| data: raw bits 0x3f78-0x3f7f.7 (8)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.[1].tuples[9]{}: tuple 0x3f60-0x3f6f.7 (16)
| | | index_tuple_data{}: 0x3f60-0x3f6f.7 (16)
| | | t_tid{}: 0x3f60-0x3f65.7 (6)
0x3f60|00 00 00 00 |.... | ip_blkid: 0 0x3f60-0x3f63.7 (4)
0x3f60| 09 00 | .. | ip_posid: 9 0x3f64-0x3f65.7 (2)
0x3f60| 10 00 | .. | t_info: 16 0x3f66-0x3f67.7 (2)
| | | flags{}: 0x3f68-NA (0)
| | | has_nulls: false 0x3f68-NA (0)
| | | has_var_widths: false 0x3f68-NA (0)
| | | size: 16 0x3f68-NA (0)
0x3f60| 09 00 00 00 00 00 00 00| ........| data: raw bits 0x3f68-0x3f6f.7 (8)
Binary file not shown.

0 comments on commit 7fd4109

Please sign in to comment.