df-script 1.4.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/README.md +203 -38
  2. package/dist/api.d.ts +16 -8
  3. package/dist/columnExpressions/ColumnExpr.d.ts +26 -364
  4. package/dist/columnExpressions/ExprBase.d.ts +8 -11
  5. package/dist/columnExpressions/constants.d.ts +2 -0
  6. package/dist/columnExpressions/functions/coalesce.d.ts +2 -2
  7. package/dist/columnExpressions/functions/element.d.ts +5 -0
  8. package/dist/columnExpressions/functions/implode.d.ts +3 -0
  9. package/dist/columnExpressions/functions/lit.d.ts +3 -1
  10. package/dist/columnExpressions/functions/seq_range.d.ts +31 -0
  11. package/dist/columnExpressions/functions/when.d.ts +2 -2
  12. package/dist/columnExpressions/index.d.ts +6 -3
  13. package/dist/columnExpressions/mixins/AggregationExpr.d.ts +25 -50
  14. package/dist/columnExpressions/mixins/ArithmeticExpr.d.ts +43 -67
  15. package/dist/columnExpressions/mixins/ArrayExpr.d.ts +39 -0
  16. package/dist/columnExpressions/mixins/ComparisonExpr.d.ts +31 -60
  17. package/dist/columnExpressions/mixins/ListExpr.d.ts +16 -40
  18. package/dist/columnExpressions/mixins/LogicalExpr.d.ts +7 -33
  19. package/dist/columnExpressions/mixins/ManipulationExpr.d.ts +6 -31
  20. package/dist/columnExpressions/mixins/StringExpr.d.ts +7 -32
  21. package/dist/columnExpressions/mixins/StructExpr.d.ts +16 -0
  22. package/dist/columnExpressions/mixins/TemporalExpr.d.ts +4 -30
  23. package/dist/columnExpressions/mixins/WindowExpr.d.ts +27 -49
  24. package/dist/columnExpressions/types.d.ts +1 -0
  25. package/dist/columnExpressions/utils.d.ts +4 -0
  26. package/dist/constants.d.ts +11 -0
  27. package/dist/dataframe/constants.d.ts +3 -0
  28. package/dist/dataframe/dataframe.d.ts +28 -11
  29. package/dist/dataframe/grouped/grouped.d.ts +2 -3
  30. package/dist/dataframe/types.d.ts +65 -1
  31. package/dist/dataframe/utils.d.ts +11 -3
  32. package/dist/datatypes/DataType.d.ts +2 -1
  33. package/dist/datatypes/index.d.ts +4 -3
  34. package/dist/datatypes/types.d.ts +42 -41
  35. package/dist/exceptions/index.d.ts +2 -0
  36. package/dist/exceptions/utils.d.ts +1 -0
  37. package/dist/functions/concat.d.ts +1 -2
  38. package/dist/functions/index.d.ts +3 -1
  39. package/dist/functions/read_csv.d.ts +8 -0
  40. package/dist/functions/read_json.d.ts +10 -0
  41. package/dist/index.js +6 -1
  42. package/dist/types.d.ts +34 -6
  43. package/dist/utils/array.d.ts +217 -0
  44. package/dist/utils/binary.d.ts +3 -0
  45. package/dist/utils/csv.d.ts +77 -0
  46. package/dist/utils/date.d.ts +21 -35
  47. package/dist/utils/guards.d.ts +11 -12
  48. package/dist/utils/index.d.ts +5 -2
  49. package/dist/utils/json.d.ts +120 -2
  50. package/dist/utils/list.d.ts +196 -2
  51. package/dist/utils/number.d.ts +47 -29
  52. package/dist/utils/object.d.ts +26 -0
  53. package/dist/utils/string.d.ts +7 -4
  54. package/package.json +6 -2
  55. package/dist/api.js +0 -18
  56. package/dist/bundle.min.js +0 -1
  57. package/dist/columnExpressions/ColumnExpr.js +0 -23
  58. package/dist/columnExpressions/ExprBase.js +0 -133
  59. package/dist/columnExpressions/constants.js +0 -5
  60. package/dist/columnExpressions/functions/all.js +0 -11
  61. package/dist/columnExpressions/functions/coalesce.js +0 -40
  62. package/dist/columnExpressions/functions/exclude.js +0 -13
  63. package/dist/columnExpressions/functions/lit.js +0 -22
  64. package/dist/columnExpressions/functions/when.js +0 -81
  65. package/dist/columnExpressions/index.js +0 -81
  66. package/dist/columnExpressions/mixins/AggregationExpr.js +0 -172
  67. package/dist/columnExpressions/mixins/ArithmeticExpr.js +0 -143
  68. package/dist/columnExpressions/mixins/ComparisonExpr.js +0 -389
  69. package/dist/columnExpressions/mixins/ListExpr.js +0 -248
  70. package/dist/columnExpressions/mixins/LogicalExpr.js +0 -54
  71. package/dist/columnExpressions/mixins/ManipulationExpr.js +0 -35
  72. package/dist/columnExpressions/mixins/StringExpr.js +0 -249
  73. package/dist/columnExpressions/mixins/TemporalExpr.js +0 -127
  74. package/dist/columnExpressions/mixins/WindowExpr.js +0 -281
  75. package/dist/columnExpressions/types.js +0 -2
  76. package/dist/dataframe/constants.js +0 -4
  77. package/dist/dataframe/dataframe.js +0 -749
  78. package/dist/dataframe/grouped/grouped.js +0 -113
  79. package/dist/dataframe/index.js +0 -20
  80. package/dist/dataframe/types.js +0 -2
  81. package/dist/dataframe/utils.js +0 -215
  82. package/dist/datatypes/DataType.js +0 -47
  83. package/dist/datatypes/index.js +0 -46
  84. package/dist/datatypes/types/Binary.d.ts +0 -9
  85. package/dist/datatypes/types/Binary.js +0 -18
  86. package/dist/datatypes/types/Boolean.d.ts +0 -9
  87. package/dist/datatypes/types/Boolean.js +0 -19
  88. package/dist/datatypes/types/Date.d.ts +0 -8
  89. package/dist/datatypes/types/Date.js +0 -21
  90. package/dist/datatypes/types/Datetime.d.ts +0 -8
  91. package/dist/datatypes/types/Datetime.js +0 -17
  92. package/dist/datatypes/types/Decimal.d.ts +0 -10
  93. package/dist/datatypes/types/Decimal.js +0 -28
  94. package/dist/datatypes/types/Duration.d.ts +0 -8
  95. package/dist/datatypes/types/Duration.js +0 -17
  96. package/dist/datatypes/types/Float32.d.ts +0 -8
  97. package/dist/datatypes/types/Float32.js +0 -17
  98. package/dist/datatypes/types/Float64.d.ts +0 -8
  99. package/dist/datatypes/types/Float64.js +0 -17
  100. package/dist/datatypes/types/Int16.d.ts +0 -8
  101. package/dist/datatypes/types/Int16.js +0 -17
  102. package/dist/datatypes/types/Int32.d.ts +0 -8
  103. package/dist/datatypes/types/Int32.js +0 -17
  104. package/dist/datatypes/types/Int64.d.ts +0 -8
  105. package/dist/datatypes/types/Int64.js +0 -17
  106. package/dist/datatypes/types/Int8.d.ts +0 -8
  107. package/dist/datatypes/types/Int8.js +0 -17
  108. package/dist/datatypes/types/List.d.ts +0 -10
  109. package/dist/datatypes/types/List.js +0 -31
  110. package/dist/datatypes/types/Null.d.ts +0 -9
  111. package/dist/datatypes/types/Null.js +0 -17
  112. package/dist/datatypes/types/Object.d.ts +0 -9
  113. package/dist/datatypes/types/Object.js +0 -17
  114. package/dist/datatypes/types/Struct.d.ts +0 -14
  115. package/dist/datatypes/types/Struct.js +0 -39
  116. package/dist/datatypes/types/Time.d.ts +0 -8
  117. package/dist/datatypes/types/Time.js +0 -29
  118. package/dist/datatypes/types/UInt16.d.ts +0 -8
  119. package/dist/datatypes/types/UInt16.js +0 -17
  120. package/dist/datatypes/types/UInt32.d.ts +0 -8
  121. package/dist/datatypes/types/UInt32.js +0 -17
  122. package/dist/datatypes/types/UInt64.d.ts +0 -8
  123. package/dist/datatypes/types/UInt64.js +0 -17
  124. package/dist/datatypes/types/UInt8.d.ts +0 -8
  125. package/dist/datatypes/types/UInt8.js +0 -17
  126. package/dist/datatypes/types/Utf8.d.ts +0 -10
  127. package/dist/datatypes/types/Utf8.js +0 -20
  128. package/dist/datatypes/types.js +0 -286
  129. package/dist/exceptions/index.js +0 -43
  130. package/dist/exceptions/utils.js +0 -9
  131. package/dist/functions/concat.js +0 -248
  132. package/dist/functions/index.js +0 -17
  133. package/dist/types.js +0 -2
  134. package/dist/utils/boolean.d.ts +0 -1
  135. package/dist/utils/boolean.js +0 -18
  136. package/dist/utils/date.js +0 -349
  137. package/dist/utils/guards.js +0 -143
  138. package/dist/utils/index.js +0 -21
  139. package/dist/utils/json.js +0 -33
  140. package/dist/utils/list.js +0 -128
  141. package/dist/utils/number.js +0 -223
  142. package/dist/utils/string.js +0 -120
@@ -1,368 +1,30 @@
1
1
  import { ExprBase } from "./ExprBase";
2
- declare const ColumnExpr_base: {
3
- new (...args: any[]): {
4
- get list(): import("./mixins/ListExpr").ListExprNamespace;
5
- ops: import("..").OpFn[];
6
- colName?: string;
7
- outputName?: string;
8
- isLiteral?: boolean;
9
- literalValue?: any;
10
- aggFn?: import("..").AggFn<any> | null;
11
- groupingOpsIndex?: number;
12
- partitionOpsIndex?: number;
13
- partitionBy?: (string | import("..").IExpr)[] | null;
14
- windowOp?: {
15
- type: string;
16
- [key: string]: any;
17
- } | null;
18
- isWindow?: boolean;
19
- alias(name: string): /*elided*/ any;
20
- cast(dataType: any): /*elided*/ any;
21
- _resolve(val: any, columns: import("..").ColumnDict, height: number): import("..").ColumnData | any;
22
- evaluate(columns: import("..").ColumnDict, height: number): import("..").ColumnData;
23
- evaluatePreGrouping(columns: import("..").ColumnDict, height: number): import("..").ColumnData;
24
- evaluatePostGrouping(aggregatedArray: any[], columns: import("..").ColumnDict): import("..").ColumnData;
25
- evaluatePrePartition(columns: import("..").ColumnDict, height: number): import("..").ColumnData;
26
- evaluatePostPartition(aggregatedArray: any[], columns: import("..").ColumnDict): import("..").ColumnData;
27
- evaluateWindow?(groupPreValues: any[], partitionIndices: number[], currentIndex: number): any;
28
- debug(label?: string): /*elided*/ any;
29
- };
30
- } & {
31
- new (...args: any[]): {
32
- get dt(): import("./mixins/TemporalExpr").DateTimeExprNamespace;
33
- ops: import("..").OpFn[];
34
- colName?: string;
35
- outputName?: string;
36
- isLiteral?: boolean;
37
- literalValue?: any;
38
- aggFn?: import("..").AggFn<any> | null;
39
- groupingOpsIndex?: number;
40
- partitionOpsIndex?: number;
41
- partitionBy?: (string | import("..").IExpr)[] | null;
42
- windowOp?: {
43
- type: string;
44
- [key: string]: any;
45
- } | null;
46
- isWindow?: boolean;
47
- alias(name: string): /*elided*/ any;
48
- cast(dataType: any): /*elided*/ any;
49
- _resolve(val: any, columns: import("..").ColumnDict, height: number): import("..").ColumnData | any;
50
- evaluate(columns: import("..").ColumnDict, height: number): import("..").ColumnData;
51
- evaluatePreGrouping(columns: import("..").ColumnDict, height: number): import("..").ColumnData;
52
- evaluatePostGrouping(aggregatedArray: any[], columns: import("..").ColumnDict): import("..").ColumnData;
53
- evaluatePrePartition(columns: import("..").ColumnDict, height: number): import("..").ColumnData;
54
- evaluatePostPartition(aggregatedArray: any[], columns: import("..").ColumnDict): import("..").ColumnData;
55
- evaluateWindow?(groupPreValues: any[], partitionIndices: number[], currentIndex: number): any;
56
- debug(label?: string): /*elided*/ any;
57
- };
58
- } & {
59
- new (...args: any[]): {
60
- and(other: any): /*elided*/ any;
61
- not(): /*elided*/ any;
62
- or(other: any): /*elided*/ any;
63
- xor(other: any): /*elided*/ any;
64
- ops: import("..").OpFn[];
65
- colName?: string;
66
- outputName?: string;
67
- isLiteral?: boolean;
68
- literalValue?: any;
69
- aggFn?: import("..").AggFn<any> | null;
70
- groupingOpsIndex?: number;
71
- partitionOpsIndex?: number;
72
- partitionBy?: (string | import("..").IExpr)[] | null;
73
- windowOp?: {
74
- type: string;
75
- [key: string]: any;
76
- } | null;
77
- isWindow?: boolean;
78
- alias(name: string): /*elided*/ any;
79
- cast(dataType: any): /*elided*/ any;
80
- _resolve(val: any, columns: import("..").ColumnDict, height: number): import("..").ColumnData | any;
81
- evaluate(columns: import("..").ColumnDict, height: number): import("..").ColumnData;
82
- evaluatePreGrouping(columns: import("..").ColumnDict, height: number): import("..").ColumnData;
83
- evaluatePostGrouping(aggregatedArray: any[], columns: import("..").ColumnDict): import("..").ColumnData;
84
- evaluatePrePartition(columns: import("..").ColumnDict, height: number): import("..").ColumnData;
85
- evaluatePostPartition(aggregatedArray: any[], columns: import("..").ColumnDict): import("..").ColumnData;
86
- evaluateWindow?(groupPreValues: any[], partitionIndices: number[], currentIndex: number): any;
87
- debug(label?: string): /*elided*/ any;
88
- };
89
- } & {
90
- new (...args: any[]): {
91
- get str(): import("./mixins/StringExpr").StringExprNamespace;
92
- ops: import("..").OpFn[];
93
- colName?: string;
94
- outputName?: string;
95
- isLiteral?: boolean;
96
- literalValue?: any;
97
- aggFn?: import("..").AggFn<any> | null;
98
- groupingOpsIndex?: number;
99
- partitionOpsIndex?: number;
100
- partitionBy?: (string | import("..").IExpr)[] | null;
101
- windowOp?: {
102
- type: string;
103
- [key: string]: any;
104
- } | null;
105
- isWindow?: boolean;
106
- alias(name: string): /*elided*/ any;
107
- cast(dataType: any): /*elided*/ any;
108
- _resolve(val: any, columns: import("..").ColumnDict, height: number): import("..").ColumnData | any;
109
- evaluate(columns: import("..").ColumnDict, height: number): import("..").ColumnData;
110
- evaluatePreGrouping(columns: import("..").ColumnDict, height: number): import("..").ColumnData;
111
- evaluatePostGrouping(aggregatedArray: any[], columns: import("..").ColumnDict): import("..").ColumnData;
112
- evaluatePrePartition(columns: import("..").ColumnDict, height: number): import("..").ColumnData;
113
- evaluatePostPartition(aggregatedArray: any[], columns: import("..").ColumnDict): import("..").ColumnData;
114
- evaluateWindow?(groupPreValues: any[], partitionIndices: number[], currentIndex: number): any;
115
- debug(label?: string): /*elided*/ any;
116
- };
117
- } & {
118
- new (...args: any[]): {
119
- partitionBy: (string | import("..").IExpr)[] | null;
120
- _rolling(windowSize: number, aggFn: (vals: any[]) => any): /*elided*/ any;
121
- get isWindow(): boolean;
122
- cum_count(reverse?: boolean): /*elided*/ any;
123
- cum_max(reverse?: boolean): /*elided*/ any;
124
- cum_min(reverse?: boolean): /*elided*/ any;
125
- cum_prod(reverse?: boolean): /*elided*/ any;
126
- cum_sum(reverse?: boolean): /*elided*/ any;
127
- dense_rank(): /*elided*/ any;
128
- lag(offset?: number, defaultVal?: any): /*elided*/ any;
129
- lead(offset?: number, defaultVal?: any): /*elided*/ any;
130
- over(columns: string | import("..").IExpr | (string | import("..").IExpr)[]): /*elided*/ any;
131
- rank(): /*elided*/ any;
132
- rolling_max(windowSize: number): /*elided*/ any;
133
- rolling_mean(windowSize: number): /*elided*/ any;
134
- rolling_median(windowSize: number): /*elided*/ any;
135
- rolling_min(windowSize: number): /*elided*/ any;
136
- rolling_quantile(quantile: number, windowSize: number): /*elided*/ any;
137
- rolling_rank(windowSize: number): /*elided*/ any;
138
- rolling_std(windowSize: number): /*elided*/ any;
139
- rolling_sum(windowSize: number): /*elided*/ any;
140
- row_number(): /*elided*/ any;
141
- ops: import("..").OpFn[];
142
- colName?: string;
143
- outputName?: string;
144
- isLiteral?: boolean;
145
- literalValue?: any;
146
- aggFn?: import("..").AggFn<any> | null;
147
- groupingOpsIndex?: number;
148
- partitionOpsIndex?: number;
149
- windowOp?: {
150
- type: string;
151
- [key: string]: any;
152
- } | null;
153
- alias(name: string): /*elided*/ any;
154
- cast(dataType: any): /*elided*/ any;
155
- _resolve(val: any, columns: import("..").ColumnDict, height: number): import("..").ColumnData | any;
156
- evaluate(columns: import("..").ColumnDict, height: number): import("..").ColumnData;
157
- evaluatePreGrouping(columns: import("..").ColumnDict, height: number): import("..").ColumnData;
158
- evaluatePostGrouping(aggregatedArray: any[], columns: import("..").ColumnDict): import("..").ColumnData;
159
- evaluatePrePartition(columns: import("..").ColumnDict, height: number): import("..").ColumnData;
160
- evaluatePostPartition(aggregatedArray: any[], columns: import("..").ColumnDict): import("..").ColumnData;
161
- evaluateWindow?(groupPreValues: any[], partitionIndices: number[], currentIndex: number): any;
162
- debug(label?: string): /*elided*/ any;
163
- };
164
- } & {
165
- new (...args: any[]): {
166
- aggFn: import("..").AggFn<any> | null;
167
- _deriveAgg(fn: import("..").AggFn<any>): /*elided*/ any;
168
- all(): /*elided*/ any;
169
- all_null(): /*elided*/ any;
170
- any(): /*elided*/ any;
171
- any_null(): /*elided*/ any;
172
- avg(): /*elided*/ any;
173
- count(options?: {
174
- includeNulls?: boolean;
175
- }): /*elided*/ any;
176
- first(): /*elided*/ any;
177
- last(): /*elided*/ any;
178
- max(): /*elided*/ any;
179
- mean(): /*elided*/ any;
180
- median(): /*elided*/ any;
181
- min(): /*elided*/ any;
182
- mode(): /*elided*/ any;
183
- n_unique(): /*elided*/ any;
184
- quantile(q: number): /*elided*/ any;
185
- std(): /*elided*/ any;
186
- sum(): /*elided*/ any;
187
- ops: import("..").OpFn[];
188
- colName?: string;
189
- outputName?: string;
190
- isLiteral?: boolean;
191
- literalValue?: any;
192
- groupingOpsIndex?: number;
193
- partitionOpsIndex?: number;
194
- partitionBy?: (string | import("..").IExpr)[] | null;
195
- windowOp?: {
196
- type: string;
197
- [key: string]: any;
198
- } | null;
199
- isWindow?: boolean;
200
- alias(name: string): /*elided*/ any;
201
- cast(dataType: any): /*elided*/ any;
202
- _resolve(val: any, columns: import("..").ColumnDict, height: number): import("..").ColumnData | any;
203
- evaluate(columns: import("..").ColumnDict, height: number): import("..").ColumnData;
204
- evaluatePreGrouping(columns: import("..").ColumnDict, height: number): import("..").ColumnData;
205
- evaluatePostGrouping(aggregatedArray: any[], columns: import("..").ColumnDict): import("..").ColumnData;
206
- evaluatePrePartition(columns: import("..").ColumnDict, height: number): import("..").ColumnData;
207
- evaluatePostPartition(aggregatedArray: any[], columns: import("..").ColumnDict): import("..").ColumnData;
208
- evaluateWindow?(groupPreValues: any[], partitionIndices: number[], currentIndex: number): any;
209
- debug(label?: string): /*elided*/ any;
210
- };
211
- } & {
212
- new (...args: any[]): {
213
- between(lower: any, upper: any, closed?: "both" | "left" | "right" | "none"): /*elided*/ any;
214
- eq(val: any): /*elided*/ any;
215
- eq_missing(val: any): /*elided*/ any;
216
- ge(val: any): /*elided*/ any;
217
- gt(val: any): /*elided*/ any;
218
- has_nulls(): any;
219
- is_close(other: any, options?: {
220
- abs_tol?: number;
221
- rel_tol?: number;
222
- nans_equal?: boolean;
223
- }): /*elided*/ any;
224
- is_duplicated(): /*elided*/ any;
225
- is_empty(options?: {
226
- ignoreNulls?: boolean;
227
- }): /*elided*/ any;
228
- is_finite(): /*elided*/ any;
229
- is_first_distinct(): /*elided*/ any;
230
- is_in(values: any[] | any): /*elided*/ any;
231
- is_infinite(): /*elided*/ any;
232
- is_last_distinct(): /*elided*/ any;
233
- is_n_distinct(n: number): any;
234
- is_nan(): /*elided*/ any;
235
- is_not_nan(): /*elided*/ any;
236
- is_not_null(): /*elided*/ any;
237
- is_null(): /*elided*/ any;
238
- is_unique(): /*elided*/ any;
239
- le(val: any): /*elided*/ any;
240
- lt(val: any): /*elided*/ any;
241
- ne(val: any): /*elided*/ any;
242
- ne_missing(val: any): /*elided*/ any;
243
- not_in(values: any[] | any): /*elided*/ any;
244
- ops: import("..").OpFn[];
245
- colName?: string;
246
- outputName?: string;
247
- isLiteral?: boolean;
248
- literalValue?: any;
249
- aggFn?: import("..").AggFn<any> | null;
250
- groupingOpsIndex?: number;
251
- partitionOpsIndex?: number;
252
- partitionBy?: (string | import("..").IExpr)[] | null;
253
- windowOp?: {
254
- type: string;
255
- [key: string]: any;
256
- } | null;
257
- isWindow?: boolean;
258
- alias(name: string): /*elided*/ any;
259
- cast(dataType: any): /*elided*/ any;
260
- _resolve(val: any, columns: import("..").ColumnDict, height: number): import("..").ColumnData | any;
261
- evaluate(columns: import("..").ColumnDict, height: number): import("..").ColumnData;
262
- evaluatePreGrouping(columns: import("..").ColumnDict, height: number): import("..").ColumnData;
263
- evaluatePostGrouping(aggregatedArray: any[], columns: import("..").ColumnDict): import("..").ColumnData;
264
- evaluatePrePartition(columns: import("..").ColumnDict, height: number): import("..").ColumnData;
265
- evaluatePostPartition(aggregatedArray: any[], columns: import("..").ColumnDict): import("..").ColumnData;
266
- evaluateWindow?(groupPreValues: any[], partitionIndices: number[], currentIndex: number): any;
267
- debug(label?: string): /*elided*/ any;
268
- };
269
- } & {
270
- new (...args: any[]): {
271
- abs(): /*elided*/ any;
272
- acos(): /*elided*/ any;
273
- acosh(): /*elided*/ any;
274
- add(val: number | import("..").IExpr | null): /*elided*/ any;
275
- asin(): /*elided*/ any;
276
- asinh(): /*elided*/ any;
277
- atan(): /*elided*/ any;
278
- atanh(): /*elided*/ any;
279
- cbrt(): /*elided*/ any;
280
- ceil(): /*elided*/ any;
281
- clip(lower?: number | null, upper?: number | null): /*elided*/ any;
282
- cos(): /*elided*/ any;
283
- cosh(): /*elided*/ any;
284
- degrees(): /*elided*/ any;
285
- div(val: number | import("..").IExpr | null): /*elided*/ any;
286
- exp(): /*elided*/ any;
287
- expm1(): /*elided*/ any;
288
- floor(): /*elided*/ any;
289
- floordiv(val: number | import("..").IExpr | null): /*elided*/ any;
290
- hypot(val: number | import("..").IExpr | null): /*elided*/ any;
291
- log(base?: number): /*elided*/ any;
292
- log1p(): /*elided*/ any;
293
- mod(val: number | import("..").IExpr | null): /*elided*/ any;
294
- mul(val: number | import("..").IExpr | null): /*elided*/ any;
295
- negate(): /*elided*/ any;
296
- pow(val: number | import("..").IExpr | null): /*elided*/ any;
297
- radians(): /*elided*/ any;
298
- rand(seed?: number, { min, max, integer }?: import("./types").RandomOptions): /*elided*/ any;
299
- round(decimals?: number): /*elided*/ any;
300
- sign(): /*elided*/ any;
301
- sin(): /*elided*/ any;
302
- sinh(): /*elided*/ any;
303
- sqrt(): /*elided*/ any;
304
- sub(val: number | import("..").IExpr | null): /*elided*/ any;
305
- tan(): /*elided*/ any;
306
- tanh(): /*elided*/ any;
307
- trunc(): /*elided*/ any;
308
- ops: import("..").OpFn[];
309
- colName?: string;
310
- outputName?: string;
311
- isLiteral?: boolean;
312
- literalValue?: any;
313
- aggFn?: import("..").AggFn<any> | null;
314
- groupingOpsIndex?: number;
315
- partitionOpsIndex?: number;
316
- partitionBy?: (string | import("..").IExpr)[] | null;
317
- windowOp?: {
318
- type: string;
319
- [key: string]: any;
320
- } | null;
321
- isWindow?: boolean;
322
- alias(name: string): /*elided*/ any;
323
- cast(dataType: any): /*elided*/ any;
324
- _resolve(val: any, columns: import("..").ColumnDict, height: number): import("..").ColumnData | any;
325
- evaluate(columns: import("..").ColumnDict, height: number): import("..").ColumnData;
326
- evaluatePreGrouping(columns: import("..").ColumnDict, height: number): import("..").ColumnData;
327
- evaluatePostGrouping(aggregatedArray: any[], columns: import("..").ColumnDict): import("..").ColumnData;
328
- evaluatePrePartition(columns: import("..").ColumnDict, height: number): import("..").ColumnData;
329
- evaluatePostPartition(aggregatedArray: any[], columns: import("..").ColumnDict): import("..").ColumnData;
330
- evaluateWindow?(groupPreValues: any[], partitionIndices: number[], currentIndex: number): any;
331
- debug(label?: string): /*elided*/ any;
332
- };
333
- } & {
334
- new (...args: any[]): {
335
- fill_null(value: any): /*elided*/ any;
336
- reverse(): /*elided*/ any;
337
- ops: import("..").OpFn[];
338
- colName?: string;
339
- outputName?: string;
340
- isLiteral?: boolean;
341
- literalValue?: any;
342
- aggFn?: import("..").AggFn<any> | null;
343
- groupingOpsIndex?: number;
344
- partitionOpsIndex?: number;
345
- partitionBy?: (string | import("..").IExpr)[] | null;
346
- windowOp?: {
347
- type: string;
348
- [key: string]: any;
349
- } | null;
350
- isWindow?: boolean;
351
- alias(name: string): /*elided*/ any;
352
- cast(dataType: any): /*elided*/ any;
353
- _resolve(val: any, columns: import("..").ColumnDict, height: number): import("..").ColumnData | any;
354
- evaluate(columns: import("..").ColumnDict, height: number): import("..").ColumnData;
355
- evaluatePreGrouping(columns: import("..").ColumnDict, height: number): import("..").ColumnData;
356
- evaluatePostGrouping(aggregatedArray: any[], columns: import("..").ColumnDict): import("..").ColumnData;
357
- evaluatePrePartition(columns: import("..").ColumnDict, height: number): import("..").ColumnData;
358
- evaluatePostPartition(aggregatedArray: any[], columns: import("..").ColumnDict): import("..").ColumnData;
359
- evaluateWindow?(groupPreValues: any[], partitionIndices: number[], currentIndex: number): any;
360
- debug(label?: string): /*elided*/ any;
361
- };
362
- } & typeof ExprBase;
363
- export declare class ColumnExpr<T> extends ColumnExpr_base {
2
+ import { ArithmeticExpr } from "./mixins/ArithmeticExpr";
3
+ import { ComparisonExpr } from "./mixins/ComparisonExpr";
4
+ import { AggregationExpr } from "./mixins/AggregationExpr";
5
+ import { WindowExpr } from "./mixins/WindowExpr";
6
+ import { StringExpr } from "./mixins/StringExpr";
7
+ import { LogicalExpr } from "./mixins/LogicalExpr";
8
+ import { TemporalExpr } from "./mixins/TemporalExpr";
9
+ import { ArrayExpr } from "./mixins/ArrayExpr";
10
+ import { StructExpr } from "./mixins/StructExpr";
11
+ import { ManipulationExpr } from "./mixins/ManipulationExpr";
12
+ import { DataType } from "../datatypes";
13
+ import type { IntoExpr, IExpr, DataFrameSchema, ColumnDict } from "../types";
14
+ export declare class ColumnExpr<T> extends ExprBase {
364
15
  colName: string;
16
+ colNames?: string[];
365
17
  excludedCols: string[];
366
- constructor(colName: keyof T | string);
18
+ targetType?: any;
19
+ targetTypes?: any[];
20
+ static isColExpr(v: unknown): v is ColumnExpr<any>;
21
+ static toColExpr(col: IntoExpr | IntoExpr[]): ColumnExpr<any>;
22
+ constructor(colName: keyof T | string | (keyof T | string)[] | DataType | Function | (DataType | Function)[]);
367
23
  }
368
- export {};
24
+ export interface ColumnExpr<T> extends ArithmeticExpr, ComparisonExpr, AggregationExpr, WindowExpr, StringExpr, LogicalExpr, TemporalExpr, ArrayExpr, StructExpr, ManipulationExpr {
25
+ }
26
+ /**
27
+ * Resolves column selectors, expanding wildcards, datatypes, and arrays of columns/types
28
+ * into concrete ColumnExpr instances.
29
+ */
30
+ export declare function resolveColumnSelectors(exprs: any[], allKeys: string[], keysToExcludeFromAll?: string[], schema?: DataFrameSchema, columns?: ColumnDict): IExpr[];
@@ -1,24 +1,21 @@
1
- import type { IExpr, OpFn, AggFn, ColumnData, ColumnDict } from "../types";
2
- import type { DataType } from "../datatypes";
3
- export declare const kleeneUnary: (fn: (v: any) => any) => (vArray: ColumnData) => any[];
4
- export declare const kleeneBinary: (expr: IExpr, other: any, fn: (v: any, r: any) => any) => (vArray: ColumnData, columns: ColumnDict) => any[];
1
+ import type { IExpr, OpFn, AggFn, ColumnData, ColumnDict, RegisteredDataType } from "../types";
5
2
  export declare const derive: <T extends IExpr>(instance: T, nextOp?: OpFn) => T;
6
3
  export declare class ExprBase implements IExpr {
7
4
  ops: OpFn[];
8
5
  outputName: string;
6
+ isLiteral?: boolean;
7
+ literalValue?: any;
9
8
  aggFn?: AggFn<any> | null;
10
9
  groupingOpsIndex?: number;
11
10
  partitionOpsIndex?: number;
12
11
  partitionBy: (string | IExpr)[] | null;
12
+ evaluateWindow?: (groupPreValues: any[], partitionIndices: number[], currentIndex: number) => any;
13
13
  _resolve(val: any, columns: ColumnDict, height: number): any;
14
14
  alias(name: string): this;
15
- cast(dataType: DataType): this;
15
+ cast(dataType: RegisteredDataType): this;
16
16
  debug(label?: string): this;
17
+ private _getInitialValue;
17
18
  evaluate(columns: ColumnDict, height: number): ColumnData;
18
- private _evaluatePre;
19
- private _evaluatePost;
20
- evaluatePrePartition(columns: ColumnDict, height: number): ColumnData;
21
- evaluatePostPartition(aggregatedArray: any[], columns: ColumnDict): ColumnData;
22
- evaluatePreGrouping(columns: ColumnDict, height: number): ColumnData;
23
- evaluatePostGrouping(aggregatedArray: any[], columns: ColumnDict): ColumnData;
19
+ evaluatePre(opsIndex: number | undefined, columns: ColumnDict, height: number): ColumnData;
20
+ evaluatePost(opsIndex: number | undefined, aggregatedArray: any[], columns: ColumnDict): ColumnData;
24
21
  }
@@ -1,2 +1,4 @@
1
1
  export declare const ALL_COLUMNS_MARKER = "*";
2
2
  export declare const LITERAL_MARKER = "*literal*";
3
+ export declare const COALESCE_MARKER = "*coalesce*";
4
+ export declare const ELEMENT_MARKER = "*element*";
@@ -1,3 +1,3 @@
1
1
  import { ColumnExpr } from "../ColumnExpr";
2
- import type { IExpr, Scalar } from "../../types";
3
- export declare function coalesce(...exprs: (IExpr | Scalar | (IExpr | Scalar)[])[]): ColumnExpr<any>;
2
+ import type { IExpr, ValidScalarTypes } from "../../types";
3
+ export declare function coalesce(...exprs: (IExpr | ValidScalarTypes | (IExpr | ValidScalarTypes)[])[]): ColumnExpr<any>;
@@ -0,0 +1,5 @@
1
+ import { ColumnExpr } from "../ColumnExpr";
2
+ /**
3
+ * Creates an expression referencing the current element(s) of an array during evaluation.
4
+ */
5
+ export declare function element<T = any>(): ColumnExpr<T>;
@@ -0,0 +1,3 @@
1
+ import { ColumnExpr } from "../ColumnExpr";
2
+ import type { IntoExpr } from "../../types";
3
+ export declare function implode(column: IntoExpr | IntoExpr[]): ColumnExpr<any>;
@@ -1,5 +1,7 @@
1
1
  import { ColumnExpr } from "../ColumnExpr";
2
+ import type { SeqRangeOptions } from "./seq_range";
3
+ export type LitOptions = Pick<SeqRangeOptions, "dtype" | "name">;
2
4
  /**
3
5
  * Creates a literal column expression that repeats the given value for all rows.
4
6
  */
5
- export declare function lit(value: any): ColumnExpr<any>;
7
+ export declare function lit(value: any, options?: LitOptions): ColumnExpr<any>;
@@ -0,0 +1,31 @@
1
+ import { ColumnExpr } from "../ColumnExpr";
2
+ import type { RegisteredDataType } from "../../types";
3
+ import { CumulativeStepContext, IndependentStepContext } from "../../utils";
4
+ export type SeqRangeOptions = {
5
+ n?: number;
6
+ dtype?: RegisteredDataType;
7
+ name?: string;
8
+ } & ({
9
+ mode: "constant";
10
+ } | {
11
+ mode?: "cumulative";
12
+ step?: number | ((context: CumulativeStepContext) => any);
13
+ } | {
14
+ mode: "independent";
15
+ step?: number | ((context: IndependentStepContext) => any);
16
+ }) & ({
17
+ strict?: true;
18
+ } | {
19
+ strict: false;
20
+ pad?: boolean;
21
+ truncate?: boolean;
22
+ padValue?: any;
23
+ startIndex?: number;
24
+ endIndex?: number;
25
+ });
26
+ /**
27
+ * Creates a column expression that generates a range of values.
28
+ * If mode is "cumulative" (default) or "independent", it generates a sequence.
29
+ * If mode is "constant", it repeats the given value.
30
+ */
31
+ export declare function seq_range(value: any, options?: SeqRangeOptions): ColumnExpr<any>;
@@ -1,6 +1,6 @@
1
1
  import { ColumnExpr } from "../ColumnExpr";
2
- import type { IExpr, Scalar } from "../../types";
3
- type WhenArg = IExpr | Scalar;
2
+ import type { IExpr, ValidScalarTypes } from "../../types";
3
+ type WhenArg = IExpr | ValidScalarTypes;
4
4
  export declare class WhenThenChain {
5
5
  private predicates;
6
6
  private values;
@@ -1,4 +1,3 @@
1
- import type { IExpr } from "../types";
2
1
  export * from "./constants";
3
2
  export * from "./types";
4
3
  export * from "./ExprBase";
@@ -9,11 +8,15 @@ export * from "./mixins/StringExpr";
9
8
  export * from "./mixins/AggregationExpr";
10
9
  export * from "./mixins/WindowExpr";
11
10
  export * from "./mixins/TemporalExpr";
12
- export * from "./mixins/ListExpr";
11
+ export * from "./mixins/ArrayExpr";
12
+ export * from "./mixins/StructExpr";
13
13
  export * from "./ColumnExpr";
14
14
  export * from "./functions/lit";
15
15
  export * from "./functions/all";
16
16
  export * from "./functions/exclude";
17
17
  export * from "./functions/coalesce";
18
18
  export * from "./functions/when";
19
- export declare function resolveColumnSelectors(exprs: any[], allKeys: string[], keysToExcludeFromAll?: string[]): IExpr[];
19
+ export * from "./functions/implode";
20
+ export * from "./functions/seq_range";
21
+ export * from "./functions/element";
22
+ export * from "./utils";
@@ -1,50 +1,25 @@
1
- import type { AggFn } from "../../types";
2
- import type { ExprConstructor } from "../types";
3
- export declare const AggregationExpr: <TBase extends ExprConstructor>(Base: TBase) => {
4
- new (...args: any[]): {
5
- aggFn: AggFn<any> | null;
6
- _deriveAgg(fn: AggFn<any>): /*elided*/ any;
7
- all(): /*elided*/ any;
8
- all_null(): /*elided*/ any;
9
- any(): /*elided*/ any;
10
- any_null(): /*elided*/ any;
11
- avg(): /*elided*/ any;
12
- count(options?: {
13
- includeNulls?: boolean;
14
- }): /*elided*/ any;
15
- first(): /*elided*/ any;
16
- last(): /*elided*/ any;
17
- max(): /*elided*/ any;
18
- mean(): /*elided*/ any;
19
- median(): /*elided*/ any;
20
- min(): /*elided*/ any;
21
- mode(): /*elided*/ any;
22
- n_unique(): /*elided*/ any;
23
- quantile(q: number): /*elided*/ any;
24
- std(): /*elided*/ any;
25
- sum(): /*elided*/ any;
26
- ops: import("../../types").OpFn[];
27
- colName?: string;
28
- outputName?: string;
29
- isLiteral?: boolean;
30
- literalValue?: any;
31
- groupingOpsIndex?: number;
32
- partitionOpsIndex?: number;
33
- partitionBy?: (string | import("../../types").IExpr)[] | null;
34
- windowOp?: {
35
- type: string;
36
- [key: string]: any;
37
- } | null;
38
- isWindow?: boolean;
39
- alias(name: string): /*elided*/ any;
40
- cast(dataType: any): /*elided*/ any;
41
- _resolve(val: any, columns: import("../../types").ColumnDict, height: number): import("../../types").ColumnData | any;
42
- evaluate(columns: import("../../types").ColumnDict, height: number): import("../../types").ColumnData;
43
- evaluatePreGrouping(columns: import("../../types").ColumnDict, height: number): import("../../types").ColumnData;
44
- evaluatePostGrouping(aggregatedArray: any[], columns: import("../../types").ColumnDict): import("../../types").ColumnData;
45
- evaluatePrePartition(columns: import("../../types").ColumnDict, height: number): import("../../types").ColumnData;
46
- evaluatePostPartition(aggregatedArray: any[], columns: import("../../types").ColumnDict): import("../../types").ColumnData;
47
- evaluateWindow?(groupPreValues: any[], partitionIndices: number[], currentIndex: number): any;
48
- debug(label?: string): /*elided*/ any;
49
- };
50
- } & TBase;
1
+ import type { AggFn, UniqueArrayStatsOptions } from "../../types";
2
+ import { ExprBase } from "../ExprBase";
3
+ export declare class AggregationExpr extends ExprBase {
4
+ _deriveAgg(fn: AggFn<any>): this;
5
+ all(): this;
6
+ all_null(): this;
7
+ any(): this;
8
+ any_null(): this;
9
+ avg(): this;
10
+ count(options?: {
11
+ includeNulls?: boolean;
12
+ }): this;
13
+ first(): this;
14
+ implode(): this;
15
+ last(): this;
16
+ max(): this;
17
+ mean(): this;
18
+ median(): this;
19
+ min(): this;
20
+ mode(): this;
21
+ n_unique(options?: UniqueArrayStatsOptions): this;
22
+ quantile(q: number): this;
23
+ std(): this;
24
+ sum(): this;
25
+ }