-
Notifications
You must be signed in to change notification settings - Fork 0
/
consts.go
113 lines (86 loc) · 1.98 KB
/
consts.go
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
package gandalff
import (
"time"
)
const (
// The default capacity of a series.
DEFAULT_SERIES_INITIAL_CAPACITY = 10
// The default capacity of a hash map.
DEFAULT_HASH_MAP_INITIAL_CAPACITY = 1024
// The default capacity of a dense map array.
DEFAULT_DENSE_MAP_ARRAY_INITIAL_CAPACITY = 64
// Number of threads to use for parallel operations.
THREADS_NUMBER = 16
// Minimum number of elements to use parallel operations.
MINIMUM_PARALLEL_SIZE_1 = 16_384
MINIMUM_PARALLEL_SIZE_2 = 131_072
HASH_MAGIC_NUMBER = int64(0xa8f4979b77e3f93)
HASH_MAGIC_NUMBER_NULL = int64(0x7fff4979b77e3f93)
HASH_NULL_KEY = int64(0x7ff8000000000001)
INF_TEXT = "Inf"
NA_TEXT = "Na"
BOOL_TRUE_TEXT = "true"
BOOL_FALSE_TEXT = "false"
CSV_READER_DEFAULT_DELIMITER = ','
CSV_READER_DEFAULT_HEADER = true
CSV_READER_DEFAULT_GUESS_DATA_TYPE_LEN = 1000
XLSX_READER_DEFAULT_GUESS_DATA_TYPE_LEN = 1000
)
//////////////////////////////// ENUMS AND INTERFACES
type SeriesSortOrder int16
const (
// The series is not sorted.
SORTED_NONE SeriesSortOrder = iota
// The series is sorted in ascending order.
SORTED_ASC
// The series is sorted in descending order.
SORTED_DESC
)
type any interface{}
type MapFunc func(v any) any
type MapFuncNull func(v any, isNull bool) (any, bool)
//////////////////////////////// NULLABLE TYPES
type NullableBool struct {
Valid bool
Value bool
}
type NullableInt8 struct {
Valid bool
Value int8
}
type NullableInt16 struct {
Valid bool
Value int16
}
type NullableInt struct {
Valid bool
Value int
}
type NullableInt32 struct {
Valid bool
Value int32
}
type NullableInt64 struct {
Valid bool
Value int64
}
type NullableFloat32 struct {
Valid bool
Value float32
}
type NullableFloat64 struct {
Valid bool
Value float64
}
type NullableString struct {
Valid bool
Value string
}
type NullableTime struct {
Valid bool
Value time.Time
}
type NullableDuration struct {
Valid bool
Value time.Duration
}