-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy pathcompression_dml.h
More file actions
52 lines (47 loc) · 2.08 KB
/
Copy pathcompression_dml.h
File metadata and controls
52 lines (47 loc) · 2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*
* This file and its contents are licensed under the Timescale License.
* Please see the included NOTICE for copyright information and
* LICENSE-TIMESCALE for a copy of the license.
*/
#pragma once
#include <postgres.h>
#include <access/skey.h>
#include <nodes/nodes.h>
#include "ts_catalog/compression_settings.h"
typedef struct tuple_filtering_constraints
{
/*
* All key column heap attribute numbers on uncompressed chunk.
* We shouldn't be dealing with system columns so no need to
* add/subtract FirstLowInvalidHeapAttributeNumber from these.
*/
Bitmapset *key_columns;
/*
* The covered flag is set to true if we have a single constraint that is covered
* by all the columns present in the Bitmapset.
*/
bool covered;
/* further fields only valid when covered is true */
OnConflictAction on_conflict;
Oid index_relid; /* used for better error messages */
bool nullsnotdistinct;
bool vectorized_filtering;
} tuple_filtering_constraints;
bool slot_key_test(TupleTableSlot *slot, ScanKey skey, bool nulls_first);
ScanKeyData *build_mem_scankeys_from_slot(Oid ht_relid, CompressionSettings *settings,
Relation out_rel,
tuple_filtering_constraints *constraints,
TupleTableSlot *slot, int *num_scankeys,
AttrNumber **slot_attnos);
ScanKeyData *build_index_scankeys(Relation index_rel, List *index_filters, int *num_scankeys);
ScanKeyData *build_index_scankeys_using_slot(Oid hypertable_relid, Relation in_rel,
Relation out_rel, Bitmapset *key_columns,
TupleTableSlot *slot, Relation *result_index_rel,
Bitmapset **index_columns, int *num_scan_keys,
AttrNumber **slot_attnos);
ScanKeyData *build_heap_scankeys(Oid hypertable_relid, Relation in_rel, Relation out_rel,
CompressionSettings *settings, Bitmapset *key_columns,
Bitmapset **null_columns, TupleTableSlot *slot, int *num_scankeys,
AttrNumber **slot_attnos);
ScanKeyData *build_update_delete_scankeys(Relation in_rel, List *heap_filters, int *num_scankeys,
Bitmapset **null_columns, bool *delete_only);