@platforma-open/milaboratories.software-ptabler.schema 1.11.3 → 1.11.5

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 (65) hide show
  1. package/dist/aggregate.d.ts +2 -1
  2. package/dist/aggregate.d.ts.map +1 -0
  3. package/dist/basic_steps.d.ts +30 -35
  4. package/dist/basic_steps.d.ts.map +1 -0
  5. package/dist/common.d.ts +1 -0
  6. package/dist/common.d.ts.map +1 -0
  7. package/dist/concatenate.d.ts +1 -0
  8. package/dist/concatenate.d.ts.map +1 -0
  9. package/dist/expressions/base.d.ts +6 -0
  10. package/dist/expressions/base.d.ts.map +1 -0
  11. package/dist/expressions/basics.d.ts +131 -0
  12. package/dist/expressions/basics.d.ts.map +1 -0
  13. package/dist/expressions/conditional.d.ts +56 -0
  14. package/dist/expressions/conditional.d.ts.map +1 -0
  15. package/dist/expressions/fuzzy.d.ts +45 -0
  16. package/dist/expressions/fuzzy.d.ts.map +1 -0
  17. package/dist/expressions/hash.d.ts +25 -0
  18. package/dist/expressions/hash.d.ts.map +1 -0
  19. package/dist/expressions/index.d.ts +25 -0
  20. package/dist/expressions/index.d.ts.map +1 -0
  21. package/dist/expressions/pframes.d.ts +115 -0
  22. package/dist/expressions/pframes.d.ts.map +1 -0
  23. package/dist/expressions/selectors.d.ts +172 -0
  24. package/dist/expressions/selectors.d.ts.map +1 -0
  25. package/dist/expressions/string.d.ts +158 -0
  26. package/dist/expressions/string.d.ts.map +1 -0
  27. package/dist/expressions/struct.d.ts +37 -0
  28. package/dist/expressions/struct.d.ts.map +1 -0
  29. package/dist/expressions/window.d.ts +52 -0
  30. package/dist/expressions/window.d.ts.map +1 -0
  31. package/dist/index.cjs +3 -0
  32. package/dist/index.cjs.map +1 -0
  33. package/dist/index.d.ts +10 -8
  34. package/dist/index.d.ts.map +1 -0
  35. package/dist/index.js +1 -1
  36. package/dist/io.d.ts +4 -1
  37. package/dist/io.d.ts.map +1 -0
  38. package/dist/join.d.ts +1 -0
  39. package/dist/join.d.ts.map +1 -0
  40. package/dist/read_frame.d.ts +26 -0
  41. package/dist/read_frame.d.ts.map +1 -0
  42. package/dist/sort.d.ts +2 -1
  43. package/dist/sort.d.ts.map +1 -0
  44. package/dist/write_frame.d.ts +1 -0
  45. package/dist/write_frame.d.ts.map +1 -0
  46. package/package.json +8 -6
  47. package/src/basic_steps.ts +32 -37
  48. package/src/expressions/base.ts +5 -0
  49. package/src/expressions/basics.ts +163 -0
  50. package/src/expressions/conditional.ts +59 -0
  51. package/src/expressions/fuzzy.ts +51 -0
  52. package/src/expressions/hash.ts +37 -0
  53. package/src/expressions/index.ts +147 -0
  54. package/src/expressions/pframes.ts +118 -0
  55. package/src/expressions/selectors.ts +203 -0
  56. package/src/expressions/string.ts +168 -0
  57. package/src/expressions/struct.ts +37 -0
  58. package/src/expressions/window.ts +66 -0
  59. package/src/index.ts +5 -1
  60. package/src/io.ts +2 -0
  61. package/src/read_frame.ts +26 -0
  62. package/dist/expressions.d.ts +0 -457
  63. package/dist/index.mjs +0 -2
  64. package/dist/index.mjs.map +0 -1
  65. package/src/expressions.ts +0 -569
@@ -0,0 +1,172 @@
1
+ import type { AxisSpec } from '@milaboratories/pl-model-common';
2
+ /**
3
+ * Represents a selector for all columns.
4
+ * Selects all columns in the DataFrame.
5
+ */
6
+ export interface AllSelectorExpression {
7
+ /** The type of operation, always 'all'. */
8
+ type: 'selector_all';
9
+ }
10
+ /**
11
+ * Represents a selector for string columns.
12
+ * Selects all columns with string data types.
13
+ */
14
+ export interface StringSelectorExpression {
15
+ /** The type of operation, always 'string'. */
16
+ type: 'selector_string';
17
+ }
18
+ /**
19
+ * Represents a selector for numeric columns.
20
+ * Selects all columns with numeric data types (integers and floats).
21
+ */
22
+ export interface NumericSelectorExpression {
23
+ /** The type of operation, always 'numeric'. */
24
+ type: 'selector_numeric';
25
+ }
26
+ /**
27
+ * Represents a selector for integer columns.
28
+ * Selects all columns with integer data types.
29
+ */
30
+ export interface IntegerSelectorExpression {
31
+ /** The type of operation, always 'integer'. */
32
+ type: 'selector_integer';
33
+ }
34
+ /**
35
+ * Represents a selector for float columns.
36
+ * Selects all columns with floating-point data types.
37
+ */
38
+ export interface FloatSelectorExpression {
39
+ /** The type of operation, always 'float'. */
40
+ type: 'selector_float';
41
+ }
42
+ /**
43
+ * Represents a selector for columns that start with a specific prefix.
44
+ * Selects columns whose names start with the specified prefix string.
45
+ */
46
+ export interface StartsWithSelectorExpression {
47
+ /** The type of operation, always 'starts_with'. */
48
+ type: 'selector_starts_with';
49
+ /** The prefix to match column names against. */
50
+ prefix: string;
51
+ }
52
+ /**
53
+ * Represents a selector for columns that end with a specific suffix.
54
+ * Selects columns whose names end with the specified suffix string.
55
+ */
56
+ export interface EndsWithSelectorExpression {
57
+ /** The type of operation, always 'ends_with'. */
58
+ type: 'selector_ends_with';
59
+ /** The suffix to match column names against. */
60
+ suffix: string;
61
+ }
62
+ /**
63
+ * Represents a selector for columns that contain a specific substring.
64
+ * Selects columns whose names contain the specified substring.
65
+ */
66
+ export interface ContainsSelectorExpression {
67
+ /** The type of operation, always 'contains'. */
68
+ type: 'selector_contains';
69
+ /** The substring to match within column names. */
70
+ substring: string;
71
+ }
72
+ /**
73
+ * Represents a selector for columns that match a regex pattern.
74
+ * Selects columns whose names match the specified regular expression pattern.
75
+ */
76
+ export interface MatchesSelectorExpression {
77
+ /** The type of operation, always 'matches'. */
78
+ type: 'selector_matches';
79
+ /** The regex pattern to match column names against. */
80
+ pattern: string;
81
+ }
82
+ /**
83
+ * Represents a selector that excludes specific columns by name.
84
+ * Selects all columns except those explicitly listed.
85
+ */
86
+ export interface ExcludeSelectorExpression {
87
+ /** The type of operation, always 'exclude'. */
88
+ type: 'selector_exclude';
89
+ /** The list of column names to exclude from selection. */
90
+ columns: string[];
91
+ }
92
+ /**
93
+ * Represents a selector for columns by their exact names.
94
+ * Selects columns that match any of the specified names.
95
+ */
96
+ export interface ByNameSelectorExpression {
97
+ /** The type of operation, always 'by_name'. */
98
+ type: 'selector_by_name';
99
+ /** The list of column names to select. */
100
+ names: string[];
101
+ }
102
+ /**
103
+ * Represents a selector for axis.
104
+ * Selects axis with the given spec if it exists in the result.
105
+ */
106
+ export interface AxisSelectorExpression {
107
+ /** The type of operation, always 'axis'. */
108
+ type: 'selector_axis';
109
+ /** The axis to select. */
110
+ axis: AxisSpec;
111
+ }
112
+ /**
113
+ * Represents a selector for nested columns.
114
+ * Selects columns that have nested/complex data types (e.g., structs, lists).
115
+ */
116
+ export interface NestedSelectorExpression {
117
+ /** The type of operation, always 'nested'. */
118
+ type: 'selector_nested';
119
+ }
120
+ /** Defines all available selector expression types. */
121
+ export type SelectorExpression = AllSelectorExpression | StringSelectorExpression | NumericSelectorExpression | IntegerSelectorExpression | FloatSelectorExpression | StartsWithSelectorExpression | EndsWithSelectorExpression | ContainsSelectorExpression | MatchesSelectorExpression | ExcludeSelectorExpression | ByNameSelectorExpression | AxisSelectorExpression | NestedSelectorExpression;
122
+ /**
123
+ * Represents the complement of a selector.
124
+ * Selects all columns that are NOT selected by the inner selector.
125
+ */
126
+ export interface SelectorComplementExpression {
127
+ /** The type of operation, always 'selector_complement'. */
128
+ type: 'selector_complement';
129
+ /** The selector to complement. */
130
+ selector: SelectorExpression;
131
+ }
132
+ /**
133
+ * Represents the union of multiple selectors.
134
+ * Selects columns that match ANY of the provided selectors (logical OR).
135
+ */
136
+ export interface SelectorUnionExpression {
137
+ /** The type of operation, always 'selector_union'. */
138
+ type: 'selector_union';
139
+ /** The list of selectors to union. */
140
+ selectors: SelectorExpression[];
141
+ }
142
+ /**
143
+ * Represents the intersection of multiple selectors.
144
+ * Selects columns that match ALL of the provided selectors (logical AND).
145
+ */
146
+ export interface SelectorIntersectionExpression {
147
+ /** The type of operation, always 'selector_intersection'. */
148
+ type: 'selector_intersection';
149
+ /** The list of selectors to intersect. */
150
+ selectors: SelectorExpression[];
151
+ }
152
+ /**
153
+ * Represents the difference of multiple selectors.
154
+ * Selects columns from the first selector minus those selected by subsequent selectors.
155
+ */
156
+ export interface SelectorDifferenceExpression {
157
+ /** The type of operation, always 'selector_difference'. */
158
+ type: 'selector_difference';
159
+ /** The list of selectors to apply difference operation. */
160
+ selectors: SelectorExpression[];
161
+ }
162
+ /**
163
+ * Represents the symmetric difference of multiple selectors.
164
+ * Selects columns that are in an odd number of the provided selectors (logical XOR).
165
+ */
166
+ export interface SelectorSymmetricDifferenceExpression {
167
+ /** The type of operation, always 'selector_symmetric_difference'. */
168
+ type: 'selector_symmetric_difference';
169
+ /** The list of selectors to apply symmetric difference operation. */
170
+ selectors: SelectorExpression[];
171
+ }
172
+ //# sourceMappingURL=selectors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../src/expressions/selectors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAEhE;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,2CAA2C;IAC3C,IAAI,EAAE,cAAc,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC,8CAA8C;IAC9C,IAAI,EAAE,iBAAiB,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC,+CAA+C;IAC/C,IAAI,EAAE,kBAAkB,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC,+CAA+C;IAC/C,IAAI,EAAE,kBAAkB,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,6CAA6C;IAC7C,IAAI,EAAE,gBAAgB,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IAC3C,mDAAmD;IACnD,IAAI,EAAE,sBAAsB,CAAC;IAC7B,gDAAgD;IAChD,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACzC,iDA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QAAQ,EAAE,kBAAkB,CAAC;CAC9B;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,sDAAsD;IACtD,IAAI,EAAE,gBAAgB,CAAC;IACvB,sCAAsC;IACtC,SAAS,EAAE,kBAAkB,EAAE,CAAC;CACjC;AAED;;;GAGG;AACH,MAAM,WAAW,8BAA8B;IAC7C,6DAA6D;IAC7D,IAAI,EAAE,uBAAuB,CAAC;IAC9B,0CAA0C;IAC1C,SAAS,EAAE,kBAAkB,EAAE,CAAC;CACjC;AAED;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IAC3C,2DAA2D;IAC3D,IAAI,EAAE,qBAAqB,CAAC;IAC5B,2DAA2D;IAC3D,SAAS,EAAE,kBAAkB,EAAE,CAAC;CACjC;AAED;;;GAGG;AACH,MAAM,WAAW,qCAAqC;IACpD,qEAAqE;IACrE,IAAI,EAAE,+BAA+B,CAAC;IACtC,qEAAqE;IACrE,SAAS,EAAE,kBAAkB,EAAE,CAAC;CACjC"}
@@ -0,0 +1,158 @@
1
+ import type { Expression } from './base';
2
+ /** Represents a string join operation on an array of expressions. */
3
+ export interface StringJoinExpression {
4
+ /** The type of operation, always 'str_join'. */
5
+ type: 'str_join';
6
+ /** An array of expressions whose string representations will be joined. */
7
+ operands: Expression[];
8
+ /** An optional delimiter string to insert between joined elements. */
9
+ delimiter?: string;
10
+ }
11
+ /** Defines the supported unary string operators. */
12
+ export type UnaryStringOperator = 'to_upper' | 'to_lower';
13
+ /** Represents a unary string operation on a single expression. */
14
+ export interface ExtendedUnaryStringExpression {
15
+ /** The type of unary string operation (e.g., 'to_upper', 'to_lower', 'str_len'). */
16
+ type: UnaryStringOperator | 'str_len';
17
+ /** The string expression to operate on. */
18
+ value: Expression;
19
+ }
20
+ /**
21
+ * Represents a substring extraction operation on an expression.
22
+ * Extracts a portion of the string value resulting from the 'value' expression.
23
+ * The substring starts at the 'start' index (0-based).
24
+ * - If 'length' is provided, it specifies the maximum length of the substring.
25
+ * - If 'end' is provided, it specifies the index *before* which the substring ends.
26
+ * - If neither 'length' nor 'end' is provided, the substring extends to the end of the string.
27
+ * - 'length' and 'end' are mutually exclusive.
28
+ * If the requested substring range extends beyond the actual string length,
29
+ * the extraction automatically stops at the end of the string.
30
+ */
31
+ export interface SubstringExpression {
32
+ /** The type of operation, always 'substring'. */
33
+ type: 'substring';
34
+ /** The expression whose string value will be used. */
35
+ value: Expression;
36
+ /** The starting position (0-indexed). Should evaluate to a number. */
37
+ start: Expression;
38
+ /** The length of the substring. Mutually exclusive with 'end'. Should evaluate to a number. */
39
+ length?: Expression;
40
+ /** The end position of the substring (exclusive). Mutually exclusive with 'length'. Should evaluate to a number. */
41
+ end?: Expression;
42
+ }
43
+ /**
44
+ * Represents a string replacement operation.
45
+ * Replaces occurrences of a pattern (regex or literal) in a string expression with a replacement string.
46
+ * The behavior is aligned with Polars' `replace` and `replace_all` functions.
47
+ *
48
+ * - If `literal` is true, the `pattern` is treated as a literal string. Otherwise, it's treated as a regular expression.
49
+ * - If `replaceAll` is true, all occurrences of the pattern are replaced. Otherwise, only the first occurrence is replaced.
50
+ *
51
+ * When using regular expressions (i.e., `literal` is false or undefined):
52
+ * - Positional capture groups can be referenced in the `replacement` string using `$n` or `${n}` (e.g., `$1` for the first group).
53
+ * - Named capture groups can be referenced using `${name}`.
54
+ * - To include a literal dollar sign (`$`) in the replacement, it must be escaped as `$$`.
55
+ */
56
+ export interface StringReplaceExpression {
57
+ /** The type of operation, always 'str_replace'. */
58
+ type: 'str_replace';
59
+ /** The input string expression to operate on. */
60
+ value: Expression;
61
+ /** The pattern (regex or literal string) to search for. Can be a string literal or an expression evaluating to a string. */
62
+ pattern: Expression | string;
63
+ /** The replacement string. Can be a string literal or an expression evaluating to a string. Can use $n or ${name} for captured groups if pattern is a regex. */
64
+ replacement: Expression | string;
65
+ /** If true, replace all occurrences of the pattern. If false or undefined, replace only the first. Defaults to false. */
66
+ replaceAll?: boolean;
67
+ /** If true, treat the pattern as a literal string. If false or undefined, treat it as a regex. Defaults to false. */
68
+ literal?: boolean;
69
+ }
70
+ /**
71
+ * Represents a string contains operation.
72
+ * Checks if the string contains a substring that matches a pattern using regex or literal matching.
73
+ * Based on polars.Series.str.contains - supports both regex and literal pattern matching with optional case-insensitive flags.
74
+ */
75
+ export interface StringContainsExpression {
76
+ /** The type of operation, always 'str_contains'. */
77
+ type: 'str_contains';
78
+ /** The input string expression to search in. */
79
+ value: Expression;
80
+ /** The pattern to search for. Can be a regex pattern (default) or literal string when literal=true. */
81
+ pattern: Expression | string;
82
+ /** If true, treat the pattern as a literal string. If false, treat it as a regex pattern. Defaults to false. */
83
+ literal?: boolean;
84
+ /** If true, raise an error if pattern is invalid regex. If false, return null for invalid patterns. Defaults to true. */
85
+ strict?: boolean;
86
+ }
87
+ /**
88
+ * Represents a string starts_with operation.
89
+ * Checks if the string starts with a specified prefix. Always uses literal matching (no regex support).
90
+ * Based on polars.Series.str.starts_with - only supports literal prefix matching.
91
+ */
92
+ export interface StringStartsWithExpression {
93
+ /** The type of operation, always 'str_starts_with'. */
94
+ type: 'str_starts_with';
95
+ /** The input string expression to check. */
96
+ value: Expression;
97
+ /** The prefix to check for (always treated as literal string, no regex support). */
98
+ prefix: Expression | string;
99
+ }
100
+ /**
101
+ * Represents a string ends_with operation.
102
+ * Checks if the string ends with a specified suffix. Always uses literal matching (no regex support).
103
+ * Based on polars.Series.str.ends_with - only supports literal suffix matching.
104
+ */
105
+ export interface StringEndsWithExpression {
106
+ /** The type of operation, always 'str_ends_with'. */
107
+ type: 'str_ends_with';
108
+ /** The input string expression to check. */
109
+ value: Expression;
110
+ /** The suffix to check for (always treated as literal string, no regex support). */
111
+ suffix: Expression | string;
112
+ }
113
+ /**
114
+ * Represents a string contains_any operation using the Aho-Corasick algorithm.
115
+ * Checks if the string contains any of the provided patterns using fast multi-pattern string matching.
116
+ * Based on polars.Series.str.contains_any - uses Aho-Corasick algorithm for efficient multi-pattern matching.
117
+ */
118
+ export interface StringContainsAnyExpression {
119
+ /** The type of operation, always 'str_contains_any'. */
120
+ type: 'str_contains_any';
121
+ /** The input string expression to search in. */
122
+ value: Expression;
123
+ /** Array of literal string patterns to search for. Only immediate string values are supported, no expressions or regex patterns. */
124
+ patterns: string[];
125
+ /** Enable ASCII-aware case insensitive matching. When enabled, searching is performed without respect to case for ASCII letters (a-z and A-Z) only. Defaults to false. */
126
+ asciiCaseInsensitive?: boolean;
127
+ }
128
+ /**
129
+ * Represents a string count_matches operation.
130
+ * Counts the number of times a pattern occurs in the string using regex or literal matching.
131
+ * Based on polars.Series.str.count_matches - supports both regex and literal pattern matching.
132
+ */
133
+ export interface StringCountMatchesExpression {
134
+ /** The type of operation, always 'str_count_matches'. */
135
+ type: 'str_count_matches';
136
+ /** The input string expression to count matches in. */
137
+ value: Expression;
138
+ /** The pattern to count occurrences of. Can be a regex pattern (default) or literal string when literal=true. */
139
+ pattern: Expression | string;
140
+ /** If true, treat the pattern as a literal string. If false, treat it as a regex pattern. Defaults to false. */
141
+ literal?: boolean;
142
+ }
143
+ /**
144
+ * Represents a string extract operation using regex patterns.
145
+ * Extracts the first match of a regex pattern from the string, optionally targeting specific capture groups.
146
+ * Based on polars.Series.str.extract - only supports regex patterns (no literal mode).
147
+ */
148
+ export interface StringExtractExpression {
149
+ /** The type of operation, always 'str_extract'. */
150
+ type: 'str_extract';
151
+ /** The input string expression to extract from. */
152
+ value: Expression;
153
+ /** The regex pattern to extract. Must be a valid regex pattern - no literal string mode is supported. */
154
+ pattern: Expression | string;
155
+ /** The capture group index to extract. Group 0 is the entire match, group 1 is the first capture group, etc. Defaults to 0. */
156
+ groupIndex?: number;
157
+ }
158
+ //# sourceMappingURL=string.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../src/expressions/string.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEzC,qEAAqE;AACrE,MAAM,WAAW,oBAAo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,37 @@
1
+ import type { DataType } from '../common';
2
+ import type { Expression } from './base';
3
+ /**
4
+ * Represents a struct field access operation.
5
+ * This operation retrieves a single field from a struct (nested data structure).
6
+ *
7
+ * Uses native Polars struct.field() functionality when possible for optimal performance,
8
+ * but falls back to Python UDF (map_elements) when dtype casting or default values
9
+ * are specified, trading performance for robust handling of missing fields and null structs.
10
+ *
11
+ * When fields is an array, the operation performs recursive field access,
12
+ * where each element in the array represents a level in the nested structure.
13
+ */
14
+ export interface StructFieldExpression {
15
+ /** The type of operation, always 'struct_field'. */
16
+ type: 'struct_field';
17
+ /** The struct expression to extract fields from. */
18
+ struct: Expression;
19
+ /**
20
+ * The field name(s) to extract from the struct.
21
+ * - If a string, extracts a single field from the struct.
22
+ * - If an array, performs recursive field access where each element represents a level in the nested structure.
23
+ */
24
+ fields: string | string[];
25
+ /**
26
+ * Optional expected data type for the returned value.
27
+ * This can be used for type validation or casting of the extracted field.
28
+ */
29
+ dtype?: DataType;
30
+ /**
31
+ * Optional default value to return if the field is not found or is null.
32
+ * If not provided and the field is missing, the operation returns null.
33
+ * Only constant scalar values are supported.
34
+ */
35
+ default?: string | number | boolean | null;
36
+ }
37
+ //# sourceMappingURL=struct.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"struct.d.ts","sourceRoot":"","sources":["../../src/expressions/struct.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEzC;;;;;;;;;;GAUG;AACH,MAAM,WAAW,qBAAqB;IACpC,oDAAoD;IACpD,IAAI,EAAE,cAAc,CAAC;IACrB,oDAAoD;IACpD,MAAM,EAAE,UAAU,CAAC;IACnB;;;;OAIG;IACH,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC1B;;;OAGG;IACH,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;CAC5C"}
@@ -0,0 +1,52 @@
1
+ import type { Expression } from './base';
2
+ /**
3
+ * Represents a rank function applied over a dataset partition.
4
+ * Calculates the rank of each row within its partition based on the specified ordering.
5
+ */
6
+ export interface RankExpression {
7
+ /** The type of operation, always 'rank'. */
8
+ type: 'rank';
9
+ /** List of expressions to partition the data by before ranking. The output of these expressions will be used for partitioning. */
10
+ partitionBy: Expression[];
11
+ /** Defines the ordering expressions within partitions to determine the rank. */
12
+ orderBy: Expression[];
13
+ /** Whether to sort in descending order. Defaults to false (ascending). */
14
+ descending?: boolean;
15
+ }
16
+ /**
17
+ * Represents a cumulative sum function applied over a dataset partition.
18
+ * Calculates the cumulative sum of the 'value' expression within each partition,
19
+ * based on the specified ordering. Values are sorted by value and then by
20
+ * additional_order_by before summing.
21
+ */
22
+ export interface CumsumExpression {
23
+ /** The type of operation, always 'cumsum'. */
24
+ type: 'cumsum';
25
+ /** The expression whose values will be cumulatively summed. */
26
+ value: Expression;
27
+ /** Defines additional ordering within partitions for the cumulative sum calculation, in addition to the ordering of the values themselves. */
28
+ additionalOrderBy: Expression[];
29
+ /** List of expressions to partition the data by before calculating the cumulative sum. The output of these expressions will be used for partitioning. */
30
+ partitionBy: Expression[];
31
+ /** Whether to sort in descending order. Defaults to false (ascending). */
32
+ descending?: boolean;
33
+ }
34
+ /**
35
+ * Defines standard aggregation functions that can be used in window expressions.
36
+ */
37
+ export type AggregationType = 'sum' | 'mean' | 'median' | 'min' | 'max' | 'std' | 'var' | 'count' | 'first' | 'last' | 'n_unique';
38
+ /**
39
+ * Represents a window function call.
40
+ * This allows applying an aggregation function over a specific partition of the data.
41
+ */
42
+ export interface WindowExpression {
43
+ /** The type of operation, always 'aggregate'. Note: This might be confusing, consider 'window_aggregate' or similar if 'aggregate' is heavily used elsewhere for a different step type. */
44
+ type: 'aggregate';
45
+ /** The aggregation function to apply (e.g., 'sum', 'mean'). */
46
+ aggregation: AggregationType;
47
+ /** The expression to apply the aggregation function to. */
48
+ value: Expression;
49
+ /** List of expressions to partition the data by. The aggregation is performed independently within each partition. */
50
+ partitionBy: Expression[];
51
+ }
52
+ //# sourceMappingURL=window.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../../src/expressions/window.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEzC;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,kIAAkI;IAClI,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,gFAAgF;IAChF,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,0EAA0E;IAC1E,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,8CAA8C;IAC9C,IAAI,EAAE,QAAQ,CAAC;IACf,+DAA+D;IAC/D,KAAK,EAAE,UAAU,CAAC;IAClB,8IAA8I;IAC9I,iBAAiB,EAAE,UAAU,EAAE,CAAC;IAChC,yJAAyJ;IACzJ,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,0EAA0E;IAC1E,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GACvB,KAAK,GACL,MAAM,GACN,QAAQ,GACR,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,OAAO,GACP,OAAO,GACP,MAAM,GACN,UAAU,CAAC;AAEf;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,2LAA2L;IAC3L,IAAI,EAAE,WAAW,CAAC;IAClB,+DAA+D;IAC/D,WAAW,EAAE,eAAe,CAAC;IAC7B,2DAA2D;IAC3D,KAAK,EAAE,UAAU,CAAC;IAClB,sHAAsH;IACtH,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B"}
package/dist/index.cjs ADDED
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
package/dist/index.d.ts CHANGED
@@ -1,13 +1,15 @@
1
- import { ReadCsvStep, ReadNdjsonStep, WriteCsvStep, WriteNdjsonStep, BaseFileReadStep, BaseFileWriteStep, WriteParquetStep, ReadParquetStep } from './io';
2
- import { AddColumnsStep, FilterStep, SelectStep, WithColumnsStep, WithoutColumnsStep } from './basic_steps';
3
- import { AggregateStep } from './aggregate';
4
- import { AnyJoinStep } from './join';
5
- import { ConcatenateStep } from './concatenate';
6
- import { SortStep } from './sort';
7
- import { WriteFrameStep } from './write_frame';
8
- export type PTablerStep = ReadCsvStep | ReadNdjsonStep | ReadParquetStep | WriteCsvStep | WriteNdjsonStep | WriteParquetStep | AddColumnsStep | FilterStep | AggregateStep | AnyJoinStep | ConcatenateStep | SortStep | SelectStep | WithColumnsStep | WithoutColumnsStep | WriteFrameStep;
1
+ import type { ReadCsvStep, ReadNdjsonStep, WriteCsvStep, WriteNdjsonStep, BaseFileReadStep, BaseFileWriteStep, WriteParquetStep, ReadParquetStep } from './io';
2
+ import type { AddColumnsStep, FilterStep, LimitStep, SelectStep, WithColumnsStep, WithoutColumnsStep } from './basic_steps';
3
+ import type { AggregateStep } from './aggregate';
4
+ import type { AnyJoinStep } from './join';
5
+ import type { ConcatenateStep } from './concatenate';
6
+ import type { SortStep } from './sort';
7
+ import type { WriteFrameStep } from './write_frame';
8
+ import type { ReadFrameStep } from './read_frame';
9
+ export type PTablerStep = ReadCsvStep | ReadNdjsonStep | ReadParquetStep | WriteCsvStep | WriteNdjsonStep | WriteParquetStep | AddColumnsStep | FilterStep | LimitStep | AggregateStep | AnyJoinStep | ConcatenateStep | SortStep | SelectStep | WithColumnsStep | WithoutColumnsStep | WriteFrameStep | ReadFrameStep;
9
10
  export type PTablerWorkflow = {
10
11
  workflow: PTablerStep[];
11
12
  };
12
13
  export type { BaseFileReadStep, BaseFileWriteStep };
13
14
  export type { Expression, StructFieldExpression } from './expressions';
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,cAAc,EACd,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EAChB,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EACV,cAAc,EACd,UAAU,EACV,SAAS,EACT,UAAU,EACV,eAAe,EACf,kBAAkB,EACnB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,MAAM,WAAW,GACnB,WAAW,GACX,cAAc,GACd,eAAe,GACf,YAAY,GACZ,eAAe,GACf,gBAAgB,GAChB,cAAc,GACd,UAAU,GACV,SAAS,GACT,aAAa,GACb,WAAW,GACX,eAAe,GACf,QAAQ,GACR,UAAU,GACV,eAAe,GACf,kBAAkB,GAClB,cAAc,GACd,aAAa,CAAC;AAElB,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,EAAE,WAAW,EAAE,CAAC;CACzB,CAAC;AAGF,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,CAAC;AAGpD,YAAY,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC"}
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";
1
+
2
2
  //# sourceMappingURL=index.js.map
package/dist/io.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { DataType } from './common';
1
+ import type { DataType } from './common';
2
2
  /**
3
3
  * Represents the schema definition for a single column.
4
4
  */
@@ -53,6 +53,8 @@ export interface ReadCsvStep extends BaseFileReadStep {
53
53
  type: 'read_csv';
54
54
  /** Optional: The delimiter character used in the CSV file. */
55
55
  delimiter?: string;
56
+ /** Optional: The prefix string used to comment out lines in the CSV file. */
57
+ commentPrefix?: string;
56
58
  }
57
59
  /** Represents the configuration for a step that reads data from an NDJSON file into the tablespace. */
58
60
  export interface ReadNdjsonStep extends BaseFileReadStep {
@@ -99,3 +101,4 @@ export interface WriteParquetStep extends BaseFileWriteStep {
99
101
  /** The type of the step, which is always 'write_parquet' for this operation. */
100
102
  type: 'write_parquet';
101
103
  }
104
+ //# sourceMappingURL=io.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"io.d.ts","sourceRoot":"","sources":["../src/io.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,8BAA8B;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,+DAA+D;IAC/D,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,qFAAqF;IACrF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,mEAAmE;IACnE,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,YAAY,EAAE,CAAC;IACxB;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,mGAAmG;AACnG,MAAM,WAAW,WAAY,SAAQ,gBAAgB;IACnD,2EAA2E;IAC3E,IAAI,EAAE,UAAU,CAAC;IACjB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6EAA6E;IAC7E,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,uGAAuG;AACvG,MAAM,WAAW,cAAe,SAAQ,gBAAgB;IACtD,8EAA8E;IAC9E,IAAI,EAAE,aAAa,CAAC;CACrB;AAED,+GAA+G;AAC/G,MAAM,WAAW,eAAgB,SAAQ,gBAAgB;IACvD,+EAA+E;IAC/E,IAAI,EAAE,cAAc,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,6DAA6D;IAC7D,KAAK,EAAE,MAAM,CAAC;IACd,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,kGAAkG;IAClG,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,YAAa,SAAQ,iBAAiB;IACrD,4EAA4E;IAC5E,IAAI,EAAE,WAAW,CAAC;IAClB,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAYD;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,iBAAiB;IACxD,+EAA+E;IAC/E,IAAI,EAAE,cAAc,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB;IACzD,gFAAgF;IAChF,IAAI,EAAE,eAAe,CAAC;CACvB"}
package/dist/join.d.ts CHANGED
@@ -82,3 +82,4 @@ export interface CrossJoinStep {
82
82
  export type JoinStrategy = 'inner' | 'left' | 'right' | 'full';
83
83
  /** Defines any possible join step. */
84
84
  export type AnyJoinStep = JoinStep | CrossJoinStep;
85
+ //# sourceMappingURL=join.d.ts.map
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AM,CAAC;AAE/D,sCAAsC;AACtC,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,aAAa,CAAC"}
@@ -0,0 +1,26 @@
1
+ import type { PTableDef, PObjectId } from '@milaboratories/pl-model-common';
2
+ /**
3
+ * Represents the configuration for a step that reads data from a PFrame directory into the tablespace.
4
+ * Creates a lazy table from the provided PFrame using polars-pf.
5
+ */
6
+ export interface ReadFrameStep {
7
+ /** The type of the step, which is always 'read_frame' for this operation. */
8
+ type: 'read_frame';
9
+ /** The name assigned to the loaded DataFrame in the tablespace. */
10
+ name: string;
11
+ /** Request to create the table from the PFrame. */
12
+ request: PTableDef<PObjectId>;
13
+ /**
14
+ * Translation from PFrame column ids (file names) into Polars column names
15
+ * (which will be referenced via pt.col(...)).
16
+ */
17
+ translation: Record<string, string>;
18
+ /**
19
+ * Polars parallel strategy to use for the read. Defaults to 'auto'.
20
+ * @see Parallel option in [scan_parquet](https://docs.pola.rs/api/python/stable/reference/api/polars.scan_parquet.html#polars.scan_parquet) documentation.
21
+ */
22
+ parallel?: 'auto' | 'columns' | 'row_groups' | 'prefiltered' | 'none';
23
+ /** Whether to use low memory mode for the polars read. Defaults to false. */
24
+ low_memory?: boolean;
25
+ }
26
+ //# sourceMappingURL=read_frame.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read_frame.d.ts","sourceRoot":"","sources":["../src/read_frame.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE5E;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,6EAA6E;IAC7E,IAAI,EAAE,YAAY,CAAC;IACnB,mEAAmE;IACnE,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,OAAO,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC9B;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,YAAY,GAAG,aAAa,GAAG,MAAM,CAAC;IACtE,6EAA6E;IAC7E,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
package/dist/sort.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Expression } from './expressions';
1
+ import type { Expression } from './expressions';
2
2
  /**
3
3
  * Defines a single sort instruction, specifying the column, sort order,
4
4
  * and null handling strategy.
@@ -41,3 +41,4 @@ export interface SortStep {
41
41
  */
42
42
  by: SortDirective[];
43
43
  }
44
+ //# sourceMappingURL=sort.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sort.d.ts","sourceRoot":"","sources":["../src/sort.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,iCAAiC;IACjC,KAAK,EAAE,UAAU,CAAC;IAElB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB,yDAAyD;IACzD,IAAI,EAAE,MAAM,CAAC;IAEb,oEAAoE;IACpE,UAAU,EAAE,MAAM,CAAC;IAEnB,mFAAmF;IACnF,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;;OAMG;IACH,EAAE,EAAE,aAAa,EAAE,CAAC;CACrB"}
@@ -55,3 +55,4 @@ export interface WriteFrameStep {
55
55
  */
56
56
  partitionKeyLength: number;
57
57
  }
58
+ //# sourceMappingURL=write_frame.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"write_frame.d.ts","sourceRoot":"","sources":["../src/write_frame.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEjD,gEAAgE;AAChE,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAExE,MAAM,WAAW,WAAW;IAC1B,iDAAiD;IACjD,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,iDAAiD;IACjD,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,gEAAgE;AAChE,MAAM,WAAW,cAAc;IAC7B,yCAAyC;IACzC,IAAI,EAAE,aAAa,CAAC;IAEpB,uEAAuE;IACvE,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,IAAI,EAAE,WAAW,EAAE,CAAC;IAEpB;;;OAGG;IACH,OAAO,EAAE,aAAa,EAAE,CAAC;IAEzB;;;;OAIG;IACH,kBAAkB,EAAE,MAAM,CAAC;CAC5B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platforma-open/milaboratories.software-ptabler.schema",
3
- "version": "1.11.3",
3
+ "version": "1.11.5",
4
4
  "description": "Type definitions for PTabler",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",
@@ -16,17 +16,19 @@
16
16
  "./dist/**/*",
17
17
  "./src/**/*"
18
18
  ],
19
- "dependencies": {},
19
+ "dependencies": {
20
+ "@milaboratories/pl-model-common": "1.21.3"
21
+ },
20
22
  "devDependencies": {
21
- "vite-plugin-dts": "^4.5.3",
22
23
  "eslint": "^9.25.1",
23
24
  "typescript": "~5.6.3",
24
- "vite": "^6.3.5",
25
+ "@milaboratories/ts-builder": "1.0.5",
26
+ "@milaboratories/ts-configs": "1.0.6",
25
27
  "@platforma-sdk/eslint-config": "1.1.0"
26
28
  },
27
29
  "scripts": {
28
- "type-check": "tsc --noEmit --composite false",
29
- "build": "vite build",
30
+ "build": "ts-builder build --target node",
31
+ "type-check": "ts-builder types --target node",
30
32
  "lint": "eslint .",
31
33
  "do-pack": "rm -f *.tgz && pnpm pack && mv *.tgz package.tgz"
32
34
  }