@@ -92,12 +92,18 @@ an array whose shape hasn't been transformed (that is, it matches the physical
92
92
arrangement of elements) is a _ vanilla_ array, and this has consequences for
93
93
performance. A vanilla array can be processed by optimized bulk operations that
94
94
go over the entire block of memory, disregarding the shape and strides, whereas
95
- for any other array we have to step through all the coordinates one by one and
95
+ for most other arrays we have to step through all the coordinates one by one and
96
96
calculate the position of each element.
97
97
98
- So, while performing a shape transformation is cheap on its own, whole-array
99
- operations on transformed arrays, such as equality checks, adding/multiplying
100
- two arrays, etc., are expected to be faster on vanilla arrays.
98
+ There's a special case where the array is transformed just so that the new array
99
+ can be found in vanilla shape within the memory block of the original array (a
100
+ contiguous sub-array). Such a transformed array is also considered vanilla.
101
+ Major examples are slicing the array at the top (leftmost) dimension, and taking
102
+ a sub-array at the top dimension.
103
+
104
+ While performing a shape transformation is cheap on its own, whole-array
105
+ operations, such as equality checks, adding/multiplying two arrays, etc., are
106
+ expected to be faster on vanilla arrays.
101
107
102
108
QuestDB always stores arrays in vanilla form. If you transform an array's shape
103
109
and then store it to the database, QuestDB will physically rearrange the
@@ -130,6 +136,12 @@ SELECT ARRAY[arr, brr] FROM tango;
130
136
| --------------------- |
131
137
| [[ 1.0,2.0] ,[ 3.0,4.0]] |
132
138
139
+ ## Array functions
140
+
141
+ Functions that operate on arrays are documented on a
142
+ [ dedicated page] ( /docs/reference/function/array ) . There are also some
143
+ [ financial functions] ( /docs/reference/function/finance#l2price ) that operate on arrays.
144
+
133
145
## Array access syntax
134
146
135
147
We model our N-dimensional array access syntax on Python's ` NDArray ` , except that
0 commit comments