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.
- package/README.md +203 -38
- package/dist/api.d.ts +16 -8
- package/dist/columnExpressions/ColumnExpr.d.ts +26 -364
- package/dist/columnExpressions/ExprBase.d.ts +8 -11
- package/dist/columnExpressions/constants.d.ts +2 -0
- package/dist/columnExpressions/functions/coalesce.d.ts +2 -2
- package/dist/columnExpressions/functions/element.d.ts +5 -0
- package/dist/columnExpressions/functions/implode.d.ts +3 -0
- package/dist/columnExpressions/functions/lit.d.ts +3 -1
- package/dist/columnExpressions/functions/seq_range.d.ts +31 -0
- package/dist/columnExpressions/functions/when.d.ts +2 -2
- package/dist/columnExpressions/index.d.ts +6 -3
- package/dist/columnExpressions/mixins/AggregationExpr.d.ts +25 -50
- package/dist/columnExpressions/mixins/ArithmeticExpr.d.ts +43 -67
- package/dist/columnExpressions/mixins/ArrayExpr.d.ts +39 -0
- package/dist/columnExpressions/mixins/ComparisonExpr.d.ts +31 -60
- package/dist/columnExpressions/mixins/ListExpr.d.ts +16 -40
- package/dist/columnExpressions/mixins/LogicalExpr.d.ts +7 -33
- package/dist/columnExpressions/mixins/ManipulationExpr.d.ts +6 -31
- package/dist/columnExpressions/mixins/StringExpr.d.ts +7 -32
- package/dist/columnExpressions/mixins/StructExpr.d.ts +16 -0
- package/dist/columnExpressions/mixins/TemporalExpr.d.ts +4 -30
- package/dist/columnExpressions/mixins/WindowExpr.d.ts +27 -49
- package/dist/columnExpressions/types.d.ts +1 -0
- package/dist/columnExpressions/utils.d.ts +4 -0
- package/dist/constants.d.ts +11 -0
- package/dist/dataframe/constants.d.ts +3 -0
- package/dist/dataframe/dataframe.d.ts +28 -11
- package/dist/dataframe/grouped/grouped.d.ts +2 -3
- package/dist/dataframe/types.d.ts +65 -1
- package/dist/dataframe/utils.d.ts +11 -3
- package/dist/datatypes/DataType.d.ts +2 -1
- package/dist/datatypes/index.d.ts +4 -3
- package/dist/datatypes/types.d.ts +42 -41
- package/dist/exceptions/index.d.ts +2 -0
- package/dist/exceptions/utils.d.ts +1 -0
- package/dist/functions/concat.d.ts +1 -2
- package/dist/functions/index.d.ts +3 -1
- package/dist/functions/read_csv.d.ts +8 -0
- package/dist/functions/read_json.d.ts +10 -0
- package/dist/index.js +6 -1
- package/dist/types.d.ts +34 -6
- package/dist/utils/array.d.ts +217 -0
- package/dist/utils/binary.d.ts +3 -0
- package/dist/utils/csv.d.ts +77 -0
- package/dist/utils/date.d.ts +21 -35
- package/dist/utils/guards.d.ts +11 -12
- package/dist/utils/index.d.ts +5 -2
- package/dist/utils/json.d.ts +120 -2
- package/dist/utils/list.d.ts +196 -2
- package/dist/utils/number.d.ts +47 -29
- package/dist/utils/object.d.ts +26 -0
- package/dist/utils/string.d.ts +7 -4
- package/package.json +6 -2
- package/dist/api.js +0 -18
- package/dist/bundle.min.js +0 -1
- package/dist/columnExpressions/ColumnExpr.js +0 -23
- package/dist/columnExpressions/ExprBase.js +0 -133
- package/dist/columnExpressions/constants.js +0 -5
- package/dist/columnExpressions/functions/all.js +0 -11
- package/dist/columnExpressions/functions/coalesce.js +0 -40
- package/dist/columnExpressions/functions/exclude.js +0 -13
- package/dist/columnExpressions/functions/lit.js +0 -22
- package/dist/columnExpressions/functions/when.js +0 -81
- package/dist/columnExpressions/index.js +0 -81
- package/dist/columnExpressions/mixins/AggregationExpr.js +0 -172
- package/dist/columnExpressions/mixins/ArithmeticExpr.js +0 -143
- package/dist/columnExpressions/mixins/ComparisonExpr.js +0 -389
- package/dist/columnExpressions/mixins/ListExpr.js +0 -248
- package/dist/columnExpressions/mixins/LogicalExpr.js +0 -54
- package/dist/columnExpressions/mixins/ManipulationExpr.js +0 -35
- package/dist/columnExpressions/mixins/StringExpr.js +0 -249
- package/dist/columnExpressions/mixins/TemporalExpr.js +0 -127
- package/dist/columnExpressions/mixins/WindowExpr.js +0 -281
- package/dist/columnExpressions/types.js +0 -2
- package/dist/dataframe/constants.js +0 -4
- package/dist/dataframe/dataframe.js +0 -749
- package/dist/dataframe/grouped/grouped.js +0 -113
- package/dist/dataframe/index.js +0 -20
- package/dist/dataframe/types.js +0 -2
- package/dist/dataframe/utils.js +0 -215
- package/dist/datatypes/DataType.js +0 -47
- package/dist/datatypes/index.js +0 -46
- package/dist/datatypes/types/Binary.d.ts +0 -9
- package/dist/datatypes/types/Binary.js +0 -18
- package/dist/datatypes/types/Boolean.d.ts +0 -9
- package/dist/datatypes/types/Boolean.js +0 -19
- package/dist/datatypes/types/Date.d.ts +0 -8
- package/dist/datatypes/types/Date.js +0 -21
- package/dist/datatypes/types/Datetime.d.ts +0 -8
- package/dist/datatypes/types/Datetime.js +0 -17
- package/dist/datatypes/types/Decimal.d.ts +0 -10
- package/dist/datatypes/types/Decimal.js +0 -28
- package/dist/datatypes/types/Duration.d.ts +0 -8
- package/dist/datatypes/types/Duration.js +0 -17
- package/dist/datatypes/types/Float32.d.ts +0 -8
- package/dist/datatypes/types/Float32.js +0 -17
- package/dist/datatypes/types/Float64.d.ts +0 -8
- package/dist/datatypes/types/Float64.js +0 -17
- package/dist/datatypes/types/Int16.d.ts +0 -8
- package/dist/datatypes/types/Int16.js +0 -17
- package/dist/datatypes/types/Int32.d.ts +0 -8
- package/dist/datatypes/types/Int32.js +0 -17
- package/dist/datatypes/types/Int64.d.ts +0 -8
- package/dist/datatypes/types/Int64.js +0 -17
- package/dist/datatypes/types/Int8.d.ts +0 -8
- package/dist/datatypes/types/Int8.js +0 -17
- package/dist/datatypes/types/List.d.ts +0 -10
- package/dist/datatypes/types/List.js +0 -31
- package/dist/datatypes/types/Null.d.ts +0 -9
- package/dist/datatypes/types/Null.js +0 -17
- package/dist/datatypes/types/Object.d.ts +0 -9
- package/dist/datatypes/types/Object.js +0 -17
- package/dist/datatypes/types/Struct.d.ts +0 -14
- package/dist/datatypes/types/Struct.js +0 -39
- package/dist/datatypes/types/Time.d.ts +0 -8
- package/dist/datatypes/types/Time.js +0 -29
- package/dist/datatypes/types/UInt16.d.ts +0 -8
- package/dist/datatypes/types/UInt16.js +0 -17
- package/dist/datatypes/types/UInt32.d.ts +0 -8
- package/dist/datatypes/types/UInt32.js +0 -17
- package/dist/datatypes/types/UInt64.d.ts +0 -8
- package/dist/datatypes/types/UInt64.js +0 -17
- package/dist/datatypes/types/UInt8.d.ts +0 -8
- package/dist/datatypes/types/UInt8.js +0 -17
- package/dist/datatypes/types/Utf8.d.ts +0 -10
- package/dist/datatypes/types/Utf8.js +0 -20
- package/dist/datatypes/types.js +0 -286
- package/dist/exceptions/index.js +0 -43
- package/dist/exceptions/utils.js +0 -9
- package/dist/functions/concat.js +0 -248
- package/dist/functions/index.js +0 -17
- package/dist/types.js +0 -2
- package/dist/utils/boolean.d.ts +0 -1
- package/dist/utils/boolean.js +0 -18
- package/dist/utils/date.js +0 -349
- package/dist/utils/guards.js +0 -143
- package/dist/utils/index.js +0 -21
- package/dist/utils/json.js +0 -33
- package/dist/utils/list.js +0 -128
- package/dist/utils/number.js +0 -223
- package/dist/utils/string.js +0 -120
|
@@ -1,67 +1,43 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import
|
|
3
|
-
export declare
|
|
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
|
-
outputName?: string;
|
|
45
|
-
isLiteral?: boolean;
|
|
46
|
-
literalValue?: any;
|
|
47
|
-
aggFn?: import("../../types").AggFn<any> | null;
|
|
48
|
-
groupingOpsIndex?: number;
|
|
49
|
-
partitionOpsIndex?: number;
|
|
50
|
-
partitionBy?: (string | IExpr)[] | null;
|
|
51
|
-
windowOp?: {
|
|
52
|
-
type: string;
|
|
53
|
-
[key: string]: any;
|
|
54
|
-
} | null;
|
|
55
|
-
isWindow?: boolean;
|
|
56
|
-
alias(name: string): /*elided*/ any;
|
|
57
|
-
cast(dataType: any): /*elided*/ any;
|
|
58
|
-
_resolve(val: any, columns: import("../../types").ColumnDict, height: number): import("../../types").ColumnData | any;
|
|
59
|
-
evaluate(columns: import("../../types").ColumnDict, height: number): import("../../types").ColumnData;
|
|
60
|
-
evaluatePreGrouping(columns: import("../../types").ColumnDict, height: number): import("../../types").ColumnData;
|
|
61
|
-
evaluatePostGrouping(aggregatedArray: any[], columns: import("../../types").ColumnDict): import("../../types").ColumnData;
|
|
62
|
-
evaluatePrePartition(columns: import("../../types").ColumnDict, height: number): import("../../types").ColumnData;
|
|
63
|
-
evaluatePostPartition(aggregatedArray: any[], columns: import("../../types").ColumnDict): import("../../types").ColumnData;
|
|
64
|
-
evaluateWindow?(groupPreValues: any[], partitionIndices: number[], currentIndex: number): any;
|
|
65
|
-
debug(label?: string): /*elided*/ any;
|
|
66
|
-
};
|
|
67
|
-
} & TBase;
|
|
1
|
+
import type { RandomOptions, NumericArg } from "../types";
|
|
2
|
+
import { ExprBase } from "../ExprBase";
|
|
3
|
+
export declare class ArithmeticExpr extends ExprBase {
|
|
4
|
+
abs(): this;
|
|
5
|
+
acos(): this;
|
|
6
|
+
acosh(): this;
|
|
7
|
+
add(val: NumericArg): this;
|
|
8
|
+
asin(): this;
|
|
9
|
+
asinh(): this;
|
|
10
|
+
atan(): this;
|
|
11
|
+
atan2(val: NumericArg): this;
|
|
12
|
+
atanh(): this;
|
|
13
|
+
cbrt(): this;
|
|
14
|
+
ceil(): this;
|
|
15
|
+
clip(lower?: number | null, upper?: number | null): this;
|
|
16
|
+
copysign(val: NumericArg): this;
|
|
17
|
+
cos(): this;
|
|
18
|
+
cosh(): this;
|
|
19
|
+
degrees(): this;
|
|
20
|
+
div(val: NumericArg): this;
|
|
21
|
+
exp(): this;
|
|
22
|
+
expm1(): this;
|
|
23
|
+
floor(): this;
|
|
24
|
+
floordiv(val: NumericArg): this;
|
|
25
|
+
hypot(val: NumericArg): this;
|
|
26
|
+
log(base?: number): this;
|
|
27
|
+
log1p(): this;
|
|
28
|
+
mod(val: NumericArg): this;
|
|
29
|
+
mul(val: NumericArg): this;
|
|
30
|
+
negate(): this;
|
|
31
|
+
pow(val: NumericArg): this;
|
|
32
|
+
radians(): this;
|
|
33
|
+
rand(seed?: number, { min, max, integer }?: RandomOptions): this;
|
|
34
|
+
round(decimals?: number): this;
|
|
35
|
+
sign(): this;
|
|
36
|
+
sin(): this;
|
|
37
|
+
sinh(): this;
|
|
38
|
+
sqrt(): this;
|
|
39
|
+
sub(val: NumericArg): this;
|
|
40
|
+
tan(): this;
|
|
41
|
+
tanh(): this;
|
|
42
|
+
trunc(): this;
|
|
43
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ExprBase } from "../ExprBase";
|
|
2
|
+
import { SortArrayOptions, StepSliceArrayOptions } from "../../utils";
|
|
3
|
+
import type { UniqueArrayStatsOptions, JoinArrayOptions, ExplodeOptions, IExpr } from "../../types";
|
|
4
|
+
export declare class ArrayExprNamespace {
|
|
5
|
+
expr: any;
|
|
6
|
+
constructor(expr: any);
|
|
7
|
+
_deriveArray(fn: (arr: any[] | ArrayBufferView) => any): any;
|
|
8
|
+
all(): any;
|
|
9
|
+
any(): any;
|
|
10
|
+
contains(item: any): any;
|
|
11
|
+
contains_all(items: ArrayLike<any>): any;
|
|
12
|
+
contains_any(items: ArrayLike<any>): any;
|
|
13
|
+
count_matches(item: any): any;
|
|
14
|
+
drop_nulls(): any;
|
|
15
|
+
explode({ empty_as_null, keep_nulls }?: ExplodeOptions): any;
|
|
16
|
+
first(null_on_oob?: boolean): any;
|
|
17
|
+
gather(indices: number | ArrayLike<number>, null_on_oob?: boolean): any;
|
|
18
|
+
gather_every(options?: StepSliceArrayOptions): any;
|
|
19
|
+
get(index: number, null_on_oob?: boolean): any;
|
|
20
|
+
join(separator?: string, options?: JoinArrayOptions): any;
|
|
21
|
+
last(null_on_oob?: boolean): any;
|
|
22
|
+
len(): any;
|
|
23
|
+
lengths(): any;
|
|
24
|
+
max(): any;
|
|
25
|
+
mean(): any;
|
|
26
|
+
median(): any;
|
|
27
|
+
min(): any;
|
|
28
|
+
mode(): any;
|
|
29
|
+
n_unique(options?: UniqueArrayStatsOptions): any;
|
|
30
|
+
reverse(): any;
|
|
31
|
+
slice(offset: number, length?: number): any;
|
|
32
|
+
sort(options?: SortArrayOptions): any;
|
|
33
|
+
sum(): any;
|
|
34
|
+
unique(options?: UniqueArrayStatsOptions): any;
|
|
35
|
+
eval(expr: IExpr): any;
|
|
36
|
+
}
|
|
37
|
+
export declare class ArrayExpr extends ExprBase {
|
|
38
|
+
get arr(): ArrayExprNamespace;
|
|
39
|
+
}
|
|
@@ -1,60 +1,31 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare
|
|
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
|
-
ne(val: any): /*elided*/ any;
|
|
33
|
-
ne_missing(val: any): /*elided*/ any;
|
|
34
|
-
not_in(values: any[] | any): /*elided*/ any;
|
|
35
|
-
ops: import("../..").OpFn[];
|
|
36
|
-
colName?: string;
|
|
37
|
-
outputName?: string;
|
|
38
|
-
isLiteral?: boolean;
|
|
39
|
-
literalValue?: any;
|
|
40
|
-
aggFn?: import("../..").AggFn<any> | null;
|
|
41
|
-
groupingOpsIndex?: number;
|
|
42
|
-
partitionOpsIndex?: number;
|
|
43
|
-
partitionBy?: (string | import("../..").IExpr)[] | null;
|
|
44
|
-
windowOp?: {
|
|
45
|
-
type: string;
|
|
46
|
-
[key: string]: any;
|
|
47
|
-
} | null;
|
|
48
|
-
isWindow?: boolean;
|
|
49
|
-
alias(name: string): /*elided*/ any;
|
|
50
|
-
cast(dataType: any): /*elided*/ any;
|
|
51
|
-
_resolve(val: any, columns: import("../..").ColumnDict, height: number): import("../..").ColumnData | any;
|
|
52
|
-
evaluate(columns: import("../..").ColumnDict, height: number): import("../..").ColumnData;
|
|
53
|
-
evaluatePreGrouping(columns: import("../..").ColumnDict, height: number): import("../..").ColumnData;
|
|
54
|
-
evaluatePostGrouping(aggregatedArray: any[], columns: import("../..").ColumnDict): import("../..").ColumnData;
|
|
55
|
-
evaluatePrePartition(columns: import("../..").ColumnDict, height: number): import("../..").ColumnData;
|
|
56
|
-
evaluatePostPartition(aggregatedArray: any[], columns: import("../..").ColumnDict): import("../..").ColumnData;
|
|
57
|
-
evaluateWindow?(groupPreValues: any[], partitionIndices: number[], currentIndex: number): any;
|
|
58
|
-
debug(label?: string): /*elided*/ any;
|
|
59
|
-
};
|
|
60
|
-
} & TBase;
|
|
1
|
+
import { ExprBase } from "../ExprBase";
|
|
2
|
+
export declare class ComparisonExpr extends ExprBase {
|
|
3
|
+
between(lower: any, upper: any, closed?: "both" | "left" | "right" | "none"): this;
|
|
4
|
+
eq(val: any): this;
|
|
5
|
+
eq_missing(val: any): this;
|
|
6
|
+
ge(val: any): this;
|
|
7
|
+
gt(val: any): this;
|
|
8
|
+
has_nulls(): any;
|
|
9
|
+
is_close(other: any, { abs_tol, rel_tol, nans_equal }?: {
|
|
10
|
+
abs_tol?: number;
|
|
11
|
+
rel_tol?: number;
|
|
12
|
+
nans_equal?: boolean;
|
|
13
|
+
}): this;
|
|
14
|
+
is_duplicated(): this;
|
|
15
|
+
is_empty({ ignoreNulls }?: {
|
|
16
|
+
ignoreNulls?: boolean;
|
|
17
|
+
}): this;
|
|
18
|
+
is_finite(): this;
|
|
19
|
+
is_in(values: any[] | any): this;
|
|
20
|
+
is_infinite(): this;
|
|
21
|
+
is_nan(): this;
|
|
22
|
+
is_not_nan(): this;
|
|
23
|
+
is_not_null(): this;
|
|
24
|
+
is_null(): this;
|
|
25
|
+
is_unique(): this;
|
|
26
|
+
le(val: any): this;
|
|
27
|
+
lt(val: any): this;
|
|
28
|
+
ne(val: any): this;
|
|
29
|
+
ne_missing(val: any): this;
|
|
30
|
+
not_in(values: any[] | any): this;
|
|
31
|
+
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ExprBase } from "../ExprBase";
|
|
2
|
+
import { SortListOptions, StepSliceListOptions } from "../../utils";
|
|
3
|
+
import type { UniqueListStatsOptions, JoinListOptions, ExplodeOptions, IExpr } from "../../types";
|
|
2
4
|
export declare class ListExprNamespace {
|
|
3
5
|
expr: any;
|
|
4
6
|
constructor(expr: any);
|
|
@@ -6,17 +8,16 @@ export declare class ListExprNamespace {
|
|
|
6
8
|
all(): any;
|
|
7
9
|
any(): any;
|
|
8
10
|
contains(item: any): any;
|
|
9
|
-
contains_all(items: any
|
|
10
|
-
contains_any(items: any
|
|
11
|
+
contains_all(items: ArrayLike<any>): any;
|
|
12
|
+
contains_any(items: ArrayLike<any>): any;
|
|
11
13
|
count_matches(item: any): any;
|
|
12
14
|
drop_nulls(): any;
|
|
15
|
+
explode({ empty_as_null, keep_nulls }?: ExplodeOptions): any;
|
|
13
16
|
first(null_on_oob?: boolean): any;
|
|
14
|
-
gather(indices: number | number
|
|
15
|
-
gather_every(
|
|
17
|
+
gather(indices: number | ArrayLike<number>, null_on_oob?: boolean): any;
|
|
18
|
+
gather_every(options?: StepSliceListOptions): any;
|
|
16
19
|
get(index: number, null_on_oob?: boolean): any;
|
|
17
|
-
join(separator
|
|
18
|
-
ignoreNulls?: boolean;
|
|
19
|
-
}): any;
|
|
20
|
+
join(separator?: string, options?: JoinListOptions): any;
|
|
20
21
|
last(null_on_oob?: boolean): any;
|
|
21
22
|
len(): any;
|
|
22
23
|
lengths(): any;
|
|
@@ -25,39 +26,14 @@ export declare class ListExprNamespace {
|
|
|
25
26
|
median(): any;
|
|
26
27
|
min(): any;
|
|
27
28
|
mode(): any;
|
|
28
|
-
n_unique(): any;
|
|
29
|
+
n_unique(options?: UniqueListStatsOptions): any;
|
|
29
30
|
reverse(): any;
|
|
30
31
|
slice(offset: number, length?: number): any;
|
|
31
|
-
sort(
|
|
32
|
+
sort(options?: SortListOptions): any;
|
|
32
33
|
sum(): any;
|
|
33
|
-
unique(): any;
|
|
34
|
+
unique(options?: UniqueListStatsOptions): any;
|
|
35
|
+
eval(expr: IExpr): any;
|
|
36
|
+
}
|
|
37
|
+
export declare class ListExpr extends ExprBase {
|
|
38
|
+
get list(): ListExprNamespace;
|
|
34
39
|
}
|
|
35
|
-
export declare const ListExpr: <TBase extends ExprConstructor>(Base: TBase) => {
|
|
36
|
-
new (...args: any[]): {
|
|
37
|
-
get list(): ListExprNamespace;
|
|
38
|
-
ops: import("../..").OpFn[];
|
|
39
|
-
colName?: string;
|
|
40
|
-
outputName?: string;
|
|
41
|
-
isLiteral?: boolean;
|
|
42
|
-
literalValue?: any;
|
|
43
|
-
aggFn?: import("../..").AggFn<any> | null;
|
|
44
|
-
groupingOpsIndex?: number;
|
|
45
|
-
partitionOpsIndex?: number;
|
|
46
|
-
partitionBy?: (string | import("../..").IExpr)[] | null;
|
|
47
|
-
windowOp?: {
|
|
48
|
-
type: string;
|
|
49
|
-
[key: string]: any;
|
|
50
|
-
} | null;
|
|
51
|
-
isWindow?: boolean;
|
|
52
|
-
alias(name: string): /*elided*/ any;
|
|
53
|
-
cast(dataType: any): /*elided*/ any;
|
|
54
|
-
_resolve(val: any, columns: import("../..").ColumnDict, height: number): import("../..").ColumnData | any;
|
|
55
|
-
evaluate(columns: import("../..").ColumnDict, height: number): import("../..").ColumnData;
|
|
56
|
-
evaluatePreGrouping(columns: import("../..").ColumnDict, height: number): import("../..").ColumnData;
|
|
57
|
-
evaluatePostGrouping(aggregatedArray: any[], columns: import("../..").ColumnDict): import("../..").ColumnData;
|
|
58
|
-
evaluatePrePartition(columns: import("../..").ColumnDict, height: number): import("../..").ColumnData;
|
|
59
|
-
evaluatePostPartition(aggregatedArray: any[], columns: import("../..").ColumnDict): import("../..").ColumnData;
|
|
60
|
-
evaluateWindow?(groupPreValues: any[], partitionIndices: number[], currentIndex: number): any;
|
|
61
|
-
debug(label?: string): /*elided*/ any;
|
|
62
|
-
};
|
|
63
|
-
} & TBase;
|
|
@@ -1,33 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
ops: import("../..").OpFn[];
|
|
9
|
-
colName?: string;
|
|
10
|
-
outputName?: string;
|
|
11
|
-
isLiteral?: boolean;
|
|
12
|
-
literalValue?: any;
|
|
13
|
-
aggFn?: import("../..").AggFn<any> | null;
|
|
14
|
-
groupingOpsIndex?: number;
|
|
15
|
-
partitionOpsIndex?: number;
|
|
16
|
-
partitionBy?: (string | import("../..").IExpr)[] | null;
|
|
17
|
-
windowOp?: {
|
|
18
|
-
type: string;
|
|
19
|
-
[key: string]: any;
|
|
20
|
-
} | null;
|
|
21
|
-
isWindow?: boolean;
|
|
22
|
-
alias(name: string): /*elided*/ any;
|
|
23
|
-
cast(dataType: any): /*elided*/ any;
|
|
24
|
-
_resolve(val: any, columns: import("../..").ColumnDict, height: number): import("../..").ColumnData | any;
|
|
25
|
-
evaluate(columns: import("../..").ColumnDict, height: number): import("../..").ColumnData;
|
|
26
|
-
evaluatePreGrouping(columns: import("../..").ColumnDict, height: number): import("../..").ColumnData;
|
|
27
|
-
evaluatePostGrouping(aggregatedArray: any[], columns: import("../..").ColumnDict): import("../..").ColumnData;
|
|
28
|
-
evaluatePrePartition(columns: import("../..").ColumnDict, height: number): import("../..").ColumnData;
|
|
29
|
-
evaluatePostPartition(aggregatedArray: any[], columns: import("../..").ColumnDict): import("../..").ColumnData;
|
|
30
|
-
evaluateWindow?(groupPreValues: any[], partitionIndices: number[], currentIndex: number): any;
|
|
31
|
-
debug(label?: string): /*elided*/ any;
|
|
32
|
-
};
|
|
33
|
-
} & TBase;
|
|
1
|
+
import { ExprBase } from "../ExprBase";
|
|
2
|
+
export declare class LogicalExpr extends ExprBase {
|
|
3
|
+
and(other: any): this;
|
|
4
|
+
not(): this;
|
|
5
|
+
or(other: any): this;
|
|
6
|
+
xor(other: any): this;
|
|
7
|
+
}
|
|
@@ -1,31 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
colName?: string;
|
|
8
|
-
outputName?: string;
|
|
9
|
-
isLiteral?: boolean;
|
|
10
|
-
literalValue?: any;
|
|
11
|
-
aggFn?: import("../..").AggFn<any> | null;
|
|
12
|
-
groupingOpsIndex?: number;
|
|
13
|
-
partitionOpsIndex?: number;
|
|
14
|
-
partitionBy?: (string | import("../..").IExpr)[] | null;
|
|
15
|
-
windowOp?: {
|
|
16
|
-
type: string;
|
|
17
|
-
[key: string]: any;
|
|
18
|
-
} | null;
|
|
19
|
-
isWindow?: boolean;
|
|
20
|
-
alias(name: string): /*elided*/ any;
|
|
21
|
-
cast(dataType: any): /*elided*/ any;
|
|
22
|
-
_resolve(val: any, columns: import("../..").ColumnDict, height: number): import("../..").ColumnData | any;
|
|
23
|
-
evaluate(columns: import("../..").ColumnDict, height: number): import("../..").ColumnData;
|
|
24
|
-
evaluatePreGrouping(columns: import("../..").ColumnDict, height: number): import("../..").ColumnData;
|
|
25
|
-
evaluatePostGrouping(aggregatedArray: any[], columns: import("../..").ColumnDict): import("../..").ColumnData;
|
|
26
|
-
evaluatePrePartition(columns: import("../..").ColumnDict, height: number): import("../..").ColumnData;
|
|
27
|
-
evaluatePostPartition(aggregatedArray: any[], columns: import("../..").ColumnDict): import("../..").ColumnData;
|
|
28
|
-
evaluateWindow?(groupPreValues: any[], partitionIndices: number[], currentIndex: number): any;
|
|
29
|
-
debug(label?: string): /*elided*/ any;
|
|
30
|
-
};
|
|
31
|
-
} & TBase;
|
|
1
|
+
import { ExprBase } from "../ExprBase";
|
|
2
|
+
import type { FillNullOptions } from "../../types";
|
|
3
|
+
export declare class ManipulationExpr extends ExprBase {
|
|
4
|
+
fill_null({ value, strategy, limit }?: FillNullOptions): this;
|
|
5
|
+
reverse(): this;
|
|
6
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { IExpr } from "../../types";
|
|
2
|
-
import
|
|
2
|
+
import { ExprBase } from "../ExprBase";
|
|
3
3
|
import { StripCharsOptions } from "../../utils";
|
|
4
4
|
export declare class StringExprNamespace {
|
|
5
5
|
expr: any;
|
|
6
6
|
constructor(expr: any);
|
|
7
7
|
_deriveString(fn: (v: string) => any): any;
|
|
8
|
+
_patternGuard(pattern: any, fn: () => any): any;
|
|
8
9
|
concat(other: string | IExpr): any;
|
|
9
10
|
contains(pattern: string | RegExp): any;
|
|
10
11
|
count_matches(pattern: string | RegExp): any;
|
|
@@ -20,8 +21,8 @@ export declare class StringExprNamespace {
|
|
|
20
21
|
lpad(width: number, fill?: string): any;
|
|
21
22
|
pad_end(width: number, fill?: string): any;
|
|
22
23
|
pad_start(width: number, fill?: string): any;
|
|
23
|
-
replace(pattern: string | RegExp, replacement: string): any;
|
|
24
|
-
replace_all(pattern: string | RegExp, replacement: string): any;
|
|
24
|
+
replace(pattern: string | RegExp, replacement: string | ((match: string, ...args: any[]) => string)): any;
|
|
25
|
+
replace_all(pattern: string | RegExp, replacement: string | ((match: string, ...args: any[]) => string)): any;
|
|
25
26
|
reverse(): any;
|
|
26
27
|
rpad(width: number, fill?: string): any;
|
|
27
28
|
slice(offset: number, length?: number): any;
|
|
@@ -48,32 +49,6 @@ export declare class StringExprNamespace {
|
|
|
48
49
|
upper(): any;
|
|
49
50
|
zfill(width: number): any;
|
|
50
51
|
}
|
|
51
|
-
export declare
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
ops: import("../../types").OpFn[];
|
|
55
|
-
colName?: string;
|
|
56
|
-
outputName?: string;
|
|
57
|
-
isLiteral?: boolean;
|
|
58
|
-
literalValue?: any;
|
|
59
|
-
aggFn?: import("../../types").AggFn<any> | null;
|
|
60
|
-
groupingOpsIndex?: number;
|
|
61
|
-
partitionOpsIndex?: number;
|
|
62
|
-
partitionBy?: (string | IExpr)[] | null;
|
|
63
|
-
windowOp?: {
|
|
64
|
-
type: string;
|
|
65
|
-
[key: string]: any;
|
|
66
|
-
} | null;
|
|
67
|
-
isWindow?: boolean;
|
|
68
|
-
alias(name: string): /*elided*/ any;
|
|
69
|
-
cast(dataType: any): /*elided*/ any;
|
|
70
|
-
_resolve(val: any, columns: import("../../types").ColumnDict, height: number): import("../../types").ColumnData | any;
|
|
71
|
-
evaluate(columns: import("../../types").ColumnDict, height: number): import("../../types").ColumnData;
|
|
72
|
-
evaluatePreGrouping(columns: import("../../types").ColumnDict, height: number): import("../../types").ColumnData;
|
|
73
|
-
evaluatePostGrouping(aggregatedArray: any[], columns: import("../../types").ColumnDict): import("../../types").ColumnData;
|
|
74
|
-
evaluatePrePartition(columns: import("../../types").ColumnDict, height: number): import("../../types").ColumnData;
|
|
75
|
-
evaluatePostPartition(aggregatedArray: any[], columns: import("../../types").ColumnDict): import("../../types").ColumnData;
|
|
76
|
-
evaluateWindow?(groupPreValues: any[], partitionIndices: number[], currentIndex: number): any;
|
|
77
|
-
debug(label?: string): /*elided*/ any;
|
|
78
|
-
};
|
|
79
|
-
} & TBase;
|
|
52
|
+
export declare class StringExpr extends ExprBase {
|
|
53
|
+
get str(): StringExprNamespace;
|
|
54
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ExprBase } from "../ExprBase";
|
|
2
|
+
import type { IntoExpr, IExpr } from "../../types";
|
|
3
|
+
export declare class StructExprNamespace {
|
|
4
|
+
expr: IExpr;
|
|
5
|
+
constructor(expr: IExpr);
|
|
6
|
+
field(name: string): IExpr;
|
|
7
|
+
rename_fields(mapping: Record<string, string>): IExpr;
|
|
8
|
+
with_fields(fields: IntoExpr[] | Record<string, IntoExpr>): IExpr;
|
|
9
|
+
unnest(): IExpr;
|
|
10
|
+
}
|
|
11
|
+
export interface StructExprNamespace {
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
}
|
|
14
|
+
export declare class StructExpr extends ExprBase {
|
|
15
|
+
get struct(): StructExprNamespace;
|
|
16
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TimeUnit } from "../../types";
|
|
2
|
-
import
|
|
2
|
+
import { ExprBase } from "../ExprBase";
|
|
3
3
|
export declare class DateTimeExprNamespace {
|
|
4
4
|
expr: any;
|
|
5
5
|
constructor(expr: any);
|
|
@@ -38,32 +38,6 @@ export declare class DateTimeExprNamespace {
|
|
|
38
38
|
weekday(): any;
|
|
39
39
|
year(): any;
|
|
40
40
|
}
|
|
41
|
-
export declare
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
ops: import("../../types").OpFn[];
|
|
45
|
-
colName?: string;
|
|
46
|
-
outputName?: string;
|
|
47
|
-
isLiteral?: boolean;
|
|
48
|
-
literalValue?: any;
|
|
49
|
-
aggFn?: import("../../types").AggFn<any> | null;
|
|
50
|
-
groupingOpsIndex?: number;
|
|
51
|
-
partitionOpsIndex?: number;
|
|
52
|
-
partitionBy?: (string | import("../../types").IExpr)[] | null;
|
|
53
|
-
windowOp?: {
|
|
54
|
-
type: string;
|
|
55
|
-
[key: string]: any;
|
|
56
|
-
} | null;
|
|
57
|
-
isWindow?: boolean;
|
|
58
|
-
alias(name: string): /*elided*/ any;
|
|
59
|
-
cast(dataType: any): /*elided*/ any;
|
|
60
|
-
_resolve(val: any, columns: import("../../types").ColumnDict, height: number): import("../../types").ColumnData | any;
|
|
61
|
-
evaluate(columns: import("../../types").ColumnDict, height: number): import("../../types").ColumnData;
|
|
62
|
-
evaluatePreGrouping(columns: import("../../types").ColumnDict, height: number): import("../../types").ColumnData;
|
|
63
|
-
evaluatePostGrouping(aggregatedArray: any[], columns: import("../../types").ColumnDict): import("../../types").ColumnData;
|
|
64
|
-
evaluatePrePartition(columns: import("../../types").ColumnDict, height: number): import("../../types").ColumnData;
|
|
65
|
-
evaluatePostPartition(aggregatedArray: any[], columns: import("../../types").ColumnDict): import("../../types").ColumnData;
|
|
66
|
-
evaluateWindow?(groupPreValues: any[], partitionIndices: number[], currentIndex: number): any;
|
|
67
|
-
debug(label?: string): /*elided*/ any;
|
|
68
|
-
};
|
|
69
|
-
} & TBase;
|
|
41
|
+
export declare class TemporalExpr extends ExprBase {
|
|
42
|
+
get dt(): DateTimeExprNamespace;
|
|
43
|
+
}
|
|
@@ -1,50 +1,28 @@
|
|
|
1
1
|
import type { IExpr } from "../../types";
|
|
2
|
-
import
|
|
3
|
-
export declare
|
|
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
|
-
outputName?: string;
|
|
30
|
-
isLiteral?: boolean;
|
|
31
|
-
literalValue?: any;
|
|
32
|
-
aggFn?: import("../../types").AggFn<any> | null;
|
|
33
|
-
groupingOpsIndex?: number;
|
|
34
|
-
partitionOpsIndex?: number;
|
|
35
|
-
windowOp?: {
|
|
36
|
-
type: string;
|
|
37
|
-
[key: string]: any;
|
|
38
|
-
} | null;
|
|
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;
|
|
2
|
+
import { ExprBase } from "../ExprBase";
|
|
3
|
+
export declare class WindowExpr extends ExprBase {
|
|
4
|
+
partitionBy: (string | IExpr)[] | null;
|
|
5
|
+
_window(evaluateWindow: (this: IExpr, groupPreValues: any[], partitionIndices: number[], currentIndex: number) => any): this;
|
|
6
|
+
_rolling(windowSize: number, aggFn: (vals: any[]) => any): this;
|
|
7
|
+
_cum(reverse: boolean, initialVal: any, stepFn: (acc: any, val: any) => any, postFn?: (acc: any, hasValid: boolean) => any): this;
|
|
8
|
+
get isWindow(): boolean;
|
|
9
|
+
cum_count(reverse?: boolean): this;
|
|
10
|
+
cum_max(reverse?: boolean): this;
|
|
11
|
+
cum_min(reverse?: boolean): this;
|
|
12
|
+
cum_prod(reverse?: boolean): this;
|
|
13
|
+
cum_sum(reverse?: boolean): this;
|
|
14
|
+
dense_rank(): this;
|
|
15
|
+
lag(offset?: number, defaultVal?: any): this;
|
|
16
|
+
lead(offset?: number, defaultVal?: any): this;
|
|
17
|
+
over(columns: string | IExpr | (string | IExpr)[]): this;
|
|
18
|
+
rank(): this;
|
|
19
|
+
rolling_max(windowSize: number): this;
|
|
20
|
+
rolling_mean(windowSize: number): this;
|
|
21
|
+
rolling_median(windowSize: number): this;
|
|
22
|
+
rolling_min(windowSize: number): this;
|
|
23
|
+
rolling_quantile(quantile: number, windowSize: number): this;
|
|
24
|
+
rolling_rank(windowSize: number): this;
|
|
25
|
+
rolling_std(windowSize: number): this;
|
|
26
|
+
rolling_sum(windowSize: number): this;
|
|
27
|
+
row_number(): this;
|
|
28
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { IExpr, ColumnData, ColumnDict } from "../types";
|
|
2
|
+
export declare const kleeneUnary: (fn: (v: any) => any) => (vArray: ColumnData) => any[];
|
|
3
|
+
export declare const kleeneBinary: (expr: IExpr, other: any, fn: (v: any, r: any) => any) => (vArray: ColumnData, columns: ColumnDict) => any[];
|
|
4
|
+
export declare function evaluateExpression(expr: IExpr, columns: ColumnDict, height: number): ColumnData;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const NEWLINE = "\n";
|
|
2
|
+
export declare const CARRIAGE_RETURN = "\r";
|
|
3
|
+
export declare const UTF8_BOM = "\uFEFF";
|
|
4
|
+
export declare const MS_PER_SECOND = 1000;
|
|
5
|
+
export declare const MS_PER_MINUTE = 60000;
|
|
6
|
+
export declare const MS_PER_HOUR = 3600000;
|
|
7
|
+
export declare const MS_PER_DAY = 86400000;
|
|
8
|
+
export declare const US_PER_MS = 1000;
|
|
9
|
+
export declare const NS_PER_MS = 1000000;
|
|
10
|
+
export declare const US_PER_MS_BI = 1000n;
|
|
11
|
+
export declare const NS_PER_MS_BI = 1000000n;
|