@narrative.io/data-collaboration-sdk-ts 1.0.1 → 1.2.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.
@@ -1,770 +0,0 @@
1
- /*!
2
- Copyright 2023 Narrative I/O, Inc.
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- NOTICE: THIS FILE HAS BEEN MODIFIED BY NARRATIVE I/O UNDER COMPLIANCE WITH THE APACHE 2.0 LICENCE FROM THE ORIGINAL WORK
11
- OF THE COMPANY Substrait (https://github.com/substrait-io/substrait-js).
12
- */
13
- type Nullability = "NULLABILITY_UNSPECIFIED" | "NULLABILITY_NULLABLE" | "NULLABILITY_REQUIRED";
14
- type FailureBehavior = "FAILURE_BEHAVIOR_UNSPECIFIED" | "FAILURE_BEHAVIOR_RETURN_NULL" | "THROW_EXCEPTION";
15
- interface AdvancedExtension {
16
- optimization: unknown;
17
- enhancement: unknown;
18
- }
19
- type LogicalOperator = "and" | "or" | "not";
20
- interface Expression {
21
- selection?: FieldReference;
22
- scalarFunction?: ScalarFunction;
23
- literal?: Literal;
24
- cast?: CastExpression;
25
- }
26
- interface FilterRelation {
27
- common: RelCommon;
28
- input: Rel;
29
- condition: Expression;
30
- advancedExtension?: AdvancedExtension;
31
- }
32
- interface ProjectRelation {
33
- common: RelCommon;
34
- input: Rel;
35
- expressions: Expression[];
36
- advancedExtension?: AdvancedExtension;
37
- }
38
- interface JoinRelation {
39
- common: RelCommon;
40
- left: Rel;
41
- right: Rel;
42
- expression: Expression;
43
- postJoinFilter: Expression;
44
- type: JoinType;
45
- advancedExtension?: AdvancedExtension;
46
- }
47
- interface CrossRelation {
48
- common: RelCommon;
49
- left: Rel;
50
- right: Rel;
51
- advancedExtension?: AdvancedExtension;
52
- }
53
- interface PlanRelation {
54
- rel?: Rel;
55
- root?: RelationRoot;
56
- }
57
- interface Extension {
58
- extensionFunction: ExtensionFunction;
59
- }
60
- export interface Plan {
61
- version?: Version;
62
- extensionUris: ExtensionUri[];
63
- extensionUriAnchor?: number;
64
- extensions: Extension[];
65
- relations: PlanRelation[];
66
- advancedExtensions?: AdvancedExtension[];
67
- expectedTypeUrls: string[];
68
- }
69
- interface Version {
70
- major_number: number;
71
- minor_number: number;
72
- patch_number: number;
73
- git_hash?: string;
74
- producer?: string;
75
- }
76
- interface FetchRelation {
77
- common: RelCommon;
78
- input: Rel;
79
- offset: number;
80
- count: number;
81
- advancedExtension: AdvancedExtension;
82
- }
83
- interface AggregateRelation {
84
- common: RelCommon;
85
- input: Rel;
86
- groupings: Grouping[];
87
- measures: Measure[];
88
- advancedExtension: AdvancedExtension;
89
- }
90
- type FunctionTyp = ScalarFunction | AggregateFunction;
91
- interface ScalarFunction {
92
- functionReference: number;
93
- args: FunctionArgument[];
94
- options: FunctionOption[];
95
- outputType: LiteralType;
96
- arguments: FunctionArgument[];
97
- }
98
- interface Grouping {
99
- groupingExpressions: Expression[];
100
- }
101
- interface Measure {
102
- measure: AggregateFunction;
103
- filter: Expression;
104
- }
105
- declare enum AggregationInvocation {
106
- AGGREGATION_INVOCATION_UNSPECIFIED = 0,
107
- AGGREGATION_INVOCATION_ALL = 1,
108
- AGGREGATION_INVOCATION_DISTINCT = 2
109
- }
110
- interface EnumTyp {
111
- deprecated?: boolean;
112
- specified?: string;
113
- unspecified?: {
114
- deprecated?: boolean;
115
- };
116
- }
117
- interface FunctionArgument {
118
- enum?: EnumTyp;
119
- type?: LiteralType;
120
- value?: Expression;
121
- }
122
- declare enum AggregationPhase {
123
- AGGREGATION_PHASE_UNSPECIFIED = 0,
124
- AGGREGATION_PHASE_INITIAL_TO_INTERMEDIATE = 1,
125
- AGGREGATION_PHASE_INTERMEDIATE_TO_INTERMEDIATE = 2,
126
- AGGREGATION_PHASE_INITIAL_TO_RESULT = 3,
127
- AGGREGATION_PHASE_INTERMEDIATE_TO_RESULT = 4
128
- }
129
- interface FunctionOption {
130
- name: string;
131
- preference: string[];
132
- }
133
- interface AggregateFunction {
134
- functionReference: number;
135
- arguments: FunctionArgument[];
136
- options: FunctionOption[];
137
- outputType: LiteralType;
138
- phase: AggregationPhase;
139
- sorts: SortField[];
140
- invocation: AggregationInvocation;
141
- args: FunctionArgument[];
142
- }
143
- interface SortRelation {
144
- common: RelCommon;
145
- input: Rel;
146
- sorts: SortField[];
147
- advancedExtension?: AdvancedExtension;
148
- }
149
- interface FilterRelation {
150
- common: RelCommon;
151
- input: Rel;
152
- condition: Expression;
153
- advancedExtension?: AdvancedExtension;
154
- }
155
- declare enum JoinType {
156
- JOIN_TYPE_UNSPECIFIED = 0,
157
- JOIN_TYPE_INNER = 1,
158
- JOIN_TYPE_OUTER = 2,
159
- JOIN_TYPE_LEFT = 3,
160
- JOIN_TYPE_RIGHT = 4,
161
- JOIN_TYPE_SEMI = 5,
162
- JOIN_TYPE_ANTI = 6,
163
- JOIN_TYPE_SINGLE = 7
164
- }
165
- declare enum SetOp {
166
- SET_OP_UNSPECIFIED = 0,
167
- SET_OP_MINUS_PRIMARY = 1,
168
- SET_OP_MINUS_MULTISET = 2,
169
- SET_OP_INTERSECTION_PRIMARY = 3,
170
- SET_OP_INTERSECTION_MULTISET = 4,
171
- SET_OP_UNION_DISTINCT = 5,
172
- SET_OP_UNION_ALL = 6
173
- }
174
- interface SetRelation {
175
- common: RelCommon;
176
- inputs: Rel[];
177
- op: SetOp;
178
- advancedExtension?: AdvancedExtension;
179
- }
180
- interface ExtensionSingleRelation {
181
- common: RelCommon;
182
- input: Rel;
183
- detail: unknown;
184
- }
185
- interface ExtensionLeafRelation {
186
- common: RelCommon;
187
- detail: unknown;
188
- }
189
- interface ExtensionMultiRelation {
190
- common: RelCommon;
191
- inputs: Rel[];
192
- detail: unknown;
193
- }
194
- interface MaskExpression {
195
- select?: {
196
- struct?: {
197
- structItems: StructItem[];
198
- };
199
- list?: {
200
- selection: ListSelectItem[];
201
- child?: Select;
202
- };
203
- map?: MapSelect;
204
- };
205
- maintain_singular_struct?: boolean;
206
- }
207
- interface StructItem {
208
- field: number;
209
- child?: StructItem;
210
- }
211
- interface ListSelectItem {
212
- item?: {
213
- field: number;
214
- };
215
- slice?: {
216
- start: number;
217
- end: number;
218
- };
219
- }
220
- interface MapSelect {
221
- key: string;
222
- child?: Select;
223
- }
224
- interface Select {
225
- struct?: {
226
- struct_items: StructItem[];
227
- };
228
- list?: {
229
- selection: ListSelectItem[];
230
- child?: Select;
231
- };
232
- map?: MapSelect;
233
- }
234
- interface ReferenceSegment {
235
- mapKey?: {
236
- map_key: Literal;
237
- child?: ReferenceSegment;
238
- };
239
- structField?: StructItem;
240
- listElement?: {
241
- offset: number;
242
- child?: ReferenceSegment;
243
- };
244
- }
245
- interface FieldReference {
246
- directReference?: ReferenceSegment;
247
- maskedReference?: MaskExpression;
248
- expression?: Expression;
249
- rootReference?: RootReference;
250
- outerReference?: OuterReference;
251
- }
252
- type RootReference = unknown;
253
- interface OuterReference {
254
- steps_out: number;
255
- }
256
- interface RelationRoot {
257
- input: Rel;
258
- names: string[];
259
- }
260
- interface ScatterFields {
261
- fields: FieldReference[];
262
- }
263
- interface SingleBucketExpression {
264
- expression: Expression;
265
- }
266
- interface MultiBucketExpression {
267
- expression: Expression;
268
- constrained_to_count: boolean;
269
- }
270
- type Broadcast = unknown;
271
- interface RoundRobin {
272
- exact: boolean;
273
- }
274
- interface ExchangeTarget {
275
- partition_id: number[];
276
- target_type: string | unknown;
277
- }
278
- interface ExchangeRelation {
279
- common: RelCommon;
280
- input: Rel;
281
- partition_count: number;
282
- targets: ExchangeTarget[];
283
- exchange_kind: ScatterFields | SingleBucketExpression | MultiBucketExpression | RoundRobin | Broadcast;
284
- advancedExtension?: AdvancedExtension;
285
- }
286
- interface Rel {
287
- root?: RelationRoot;
288
- filter?: FilterRelation;
289
- project?: ProjectRelation;
290
- join?: JoinRelation;
291
- cross?: CrossRelation;
292
- fetch?: FetchRelation;
293
- aggregate?: AggregateRelation;
294
- sort?: SortRelation;
295
- set?: SetRelation;
296
- single?: ExtensionSingleRelation;
297
- leaf?: ExtensionLeafRelation;
298
- multi?: ExtensionMultiRelation;
299
- exchange?: ExchangeRelation;
300
- read?: ReadRelation;
301
- }
302
- interface CastExpression {
303
- type: LiteralType;
304
- input: Expression;
305
- failureBehavior: FailureBehavior;
306
- }
307
- declare enum SortDirection {
308
- UNSPECIFIED = 0,
309
- ASCENDING_NULLS_FIRST = 1,
310
- ASCENDING_NULLS_LAST = 2,
311
- DESCENDING_NULLS_FIRST = 3,
312
- DESCENDING_NULLS_LAST = 4,
313
- CLUSTERED = 5
314
- }
315
- interface SortField {
316
- expr: Expression;
317
- direction: SortDirection;
318
- }
319
- interface Literal extends LiteralType {
320
- nullable: boolean;
321
- typeVariationReference: number;
322
- }
323
- interface LiteralType {
324
- bool?: BoolTyp;
325
- i8?: number;
326
- i16?: number;
327
- i32?: I32;
328
- i64?: I64;
329
- fp32?: number;
330
- fp64?: FP64;
331
- string?: StrType;
332
- binary?: Uint8Array;
333
- timestamp?: number;
334
- date?: Date;
335
- time?: number;
336
- intervalYearToMonth?: IntervalYearToMonth;
337
- intervalDayToSecond?: IntervalDayToSecond;
338
- fixedChar?: FixedChar | string;
339
- varchar?: VarChar;
340
- fixedBinary?: FixedBinary;
341
- decimal?: Decimal;
342
- struct?: Struct;
343
- map?: MapTyp;
344
- timestampTz?: TimestampTz;
345
- uuid?: Uint8Array;
346
- null?: unknown;
347
- list?: List;
348
- empty_list?: unknown;
349
- empty_map?: unknown;
350
- user_defined?: unknown;
351
- }
352
- interface FixedBinary {
353
- typeVariationReference: number;
354
- value?: Uint8Array;
355
- length: number;
356
- nullability: Nullability;
357
- }
358
- interface TimestampTz {
359
- typeVariationReference: number;
360
- value?: number;
361
- nullability: Nullability;
362
- }
363
- interface BoolTyp {
364
- typeVariationReference: number;
365
- value?: boolean;
366
- nullability: Nullability;
367
- }
368
- interface StrType {
369
- typeVariationReference: number;
370
- value?: string;
371
- nullability: Nullability;
372
- }
373
- interface I32 {
374
- typeVariationReference: number;
375
- value?: number;
376
- nullability: Nullability;
377
- }
378
- interface FP64 {
379
- typeVariationReference: number;
380
- value?: number;
381
- nullability: Nullability;
382
- }
383
- interface I64 {
384
- typeVariationReference: number;
385
- value?: number;
386
- nullability: Nullability;
387
- }
388
- interface Date {
389
- typeVariationReference: number;
390
- nullability: Nullability;
391
- value?: number;
392
- }
393
- interface FixedChar {
394
- typeVariationReference: number;
395
- value?: string;
396
- length: number;
397
- nullability: Nullability;
398
- }
399
- interface VarChar {
400
- typeVariationReference: number;
401
- value?: string;
402
- length: number;
403
- nullability: Nullability;
404
- }
405
- interface Decimal {
406
- value?: string;
407
- precision: number;
408
- scale: number;
409
- nullability?: Nullability;
410
- typeVariationReference?: number;
411
- }
412
- interface MapTyp {
413
- typeVariationReference: number;
414
- key_values: KeyValue[];
415
- }
416
- interface KeyValue {
417
- key: Literal;
418
- value: Literal;
419
- }
420
- interface IntervalYearToMonth {
421
- typeVariationReference: number;
422
- years: number;
423
- months: number;
424
- }
425
- interface IntervalDayToSecond {
426
- typeVariationReference: number;
427
- days: number;
428
- seconds: number;
429
- microseconds: number;
430
- }
431
- interface List {
432
- type: LiteralType;
433
- typeVariationReference: number;
434
- values?: Literal[];
435
- nullability: Nullability;
436
- }
437
- interface ExtensionUri {
438
- extensionUriAnchor: number;
439
- uri: string;
440
- }
441
- interface Extension {
442
- extensionFunction: ExtensionFunction;
443
- }
444
- interface NamedTable {
445
- names: string[];
446
- }
447
- interface SimpleProperty {
448
- name: string;
449
- value: string;
450
- }
451
- interface NamedStruct {
452
- names: string[];
453
- struct: Struct;
454
- }
455
- interface Stats {
456
- row_count: number;
457
- record_size: number;
458
- advancedExtension?: AdvancedExtension;
459
- }
460
- interface RuntimeConstraint {
461
- advancedExtension?: AdvancedExtension;
462
- }
463
- interface Hint {
464
- stats: Stats;
465
- constraint: RuntimeConstraint;
466
- advancedExtension?: AdvancedExtension;
467
- }
468
- interface RelCommon {
469
- emit?: Emit;
470
- hint?: Hint;
471
- advancedExtension?: AdvancedExtension;
472
- direct?: unknown;
473
- }
474
- interface Struct {
475
- types: LiteralType[];
476
- nullability: Nullability;
477
- typeVariationReference: number;
478
- fields?: Literal[];
479
- }
480
- interface Emit {
481
- outputMapping: number[];
482
- }
483
- interface ReadRelation {
484
- namedTable: NamedTable;
485
- baseSchema: NamedStruct;
486
- common: RelCommon;
487
- }
488
- interface ExtensionFunction {
489
- functionAnchor: number;
490
- name: string;
491
- extensionUriReference: number;
492
- }
493
- interface Field {
494
- name: string;
495
- type: string;
496
- nullability: Nullability;
497
- children: Field[];
498
- }
499
- interface PrintNode {
500
- id: string;
501
- type: string;
502
- inputs: PrintNode[];
503
- props: SimpleProperty[];
504
- schema: Field;
505
- }
506
- declare class SubstraitParser {
507
- idCounters: Map<string, number>;
508
- extSet: Map<number, string>;
509
- fieldNames: string[];
510
- selectedFields: string[];
511
- filters: string[];
512
- logicalOperators: LogicalOperator[];
513
- /**
514
- * Constructs a SubstraitParser
515
- * @param {SubstraitPlan} plan the Substrait plan
516
- */
517
- constructor(plan: Plan);
518
- /**
519
- * Creates a map from anchor to function name
520
- * @param {SubstraitPlan} plan the Substrait plan
521
- * @return {Map<number, string>} the created mapping
522
- */
523
- buildExtensionSet(plan: Plan): Map<number, string>;
524
- /**
525
- * Geneate a unique id for the node
526
- * @param {string} type The type of the node
527
- * @return {string} A unique id
528
- */
529
- nextId(type: string): string;
530
- /**
531
- * Create a schema field
532
- *
533
- * This is a special field with an empty name and an empty type string
534
- * and uknown nullability
535
- *
536
- * @param {Field[]} fields the fields of the schema
537
- * @return {Field} a schema field
538
- */
539
- makeSchemaField(fields: Field[]): Field;
540
- /**
541
- * Applies a Substrait emit to an output schema
542
- * @param {Field} schema the original output schema
543
- * @param {Object} emit a potential remapping of fields
544
- * @return {Field} the remapped output schema
545
- */
546
- applyEmit(schema: Field, emit?: Emit): Field;
547
- /**
548
- * Create a print node, generating a new id
549
- *
550
- * @param {string} type the node type
551
- * @param {PrintNode[]} inputs the inputs to the node
552
- * @param {SimpleProperty[]} props properties describing the node
553
- * @param {Field} schema the output schema of the node
554
- * @param {Object} emit the Substrait emit for the node
555
- * @return {PrintNode} a print node
556
- */
557
- makePrintNode(type: string, inputs: PrintNode[], props: SimpleProperty[], schema: Field, emit?: Emit): PrintNode;
558
- /**
559
- * Recursive helper for structFieldToStr
560
- * @param {*} field the Substrait field to convert
561
- * @param {*} currentName the current name
562
- * @param {Field} currentField the current input field
563
- * @return {Field} a stringified represenstation
564
- */
565
- structFieldHelper(field: StructItem, currentName: string, currentField: Field): Field;
566
- /**
567
- * Convert a struct field to a stringified representation
568
- *
569
- * Struct fields are usually intuitively written with names.
570
- * For example, a.b.c. However, fields in Substrait plans
571
- * are not typically named. So instead we represent them as
572
- * $0, $1, $2, ... where $N means the field at index N.
573
- *
574
- * If the field does happen to be named we will use that.
575
- *
576
- * @param {StructItem} field a Substrait struct field
577
- * @param {Field} exprIn the input to the expression
578
- * @return {Field} a stringified representation
579
- */
580
- structFieldToField(field: StructItem, exprIn: Field): Field;
581
- /**
582
- * Convert a direct reference to a stringified representation
583
- * @param {Object} ref A Substrait direct reference
584
- * @param {Object} exprIn the input to the expression
585
- * @return {Field} a string representation
586
- */
587
- directReferenceToField(ref: ReferenceSegment, exprIn: Field): Field;
588
- /**
589
- * Convert a reference to a stringified representation
590
- * @param {Object} ref A Substrait reference expression
591
- * @param {Object} exprIn the input to the expression
592
- * @return {Field} a string representation
593
- */
594
- referenceToField(ref: FieldReference, exprIn: Field): Field;
595
- /**
596
- * Convert a Substrait function argument to a string
597
- * @param {Object} arg the argument to convert
598
- * @param {Field} inp the input field
599
- * @return {string} a string representation
600
- */
601
- functionArgumentToStr(arg: FunctionArgument, inp: Field): string;
602
- /**
603
- * Converts a Substrait function reference to a string
604
- * @param {number} ref a Substrait function reference
605
- * @return {string} a string version of the reference
606
- */
607
- functionRefToName(ref: number): string;
608
- /**
609
- * Convert arguments to a joined string
610
- * @param {FunctionTyp} func A Substrait function call
611
- * @param {Field} schema The input type
612
- * @return {string} A string representation
613
- */
614
- argsToString(func: FunctionTyp, schema: Field): string;
615
- /**
616
- * Convert a scalar function to a stringified representation
617
- * @param {Object} func the function to convert
618
- * @param {Field} schema the input type info
619
- * @return {Field} a string version of the function
620
- */
621
- scalarFunctionToField(func: ScalarFunction, schema: Field): Field;
622
- /**
623
- * Converts a Substrait literal to a field
624
- * @param {Object} lit the Substrait literal
625
- * @return {Field} a field representation
626
- */
627
- literalToField(lit: Literal): Field;
628
- /**
629
- * Convert a cast expression to a stringified representation
630
- * @param {Object} cast A Substrait cast expression
631
- * @param {Field} schema The input schema
632
- * @return {Field} A field representation
633
- */
634
- castToField(cast: CastExpression, schema: Field): Field;
635
- /**
636
- * Convert an expression to a stringified representation
637
- *
638
- * The expression is returned as a field where the type
639
- * of the field is the output type of the expression and the
640
- * name of the field is a string representation of the expression
641
- *
642
- * @param {Object} expr A Substrait expression
643
- * @param {Object} exprIn the input to the expression
644
- * @return {Field} a string representation
645
- */
646
- expressionToStr(expr: Expression, exprIn: Field): Field;
647
- /**
648
- * Convert a project relation to a print node
649
- * @param {Object} project A Substrait ProjectRel
650
- * @return {PrintNode} a print node
651
- */
652
- projectToNode(project: ProjectRelation): PrintNode;
653
- /**
654
- * Convert a Substrait data type to an unnamed Field
655
- *
656
- * The field's name will be an empty string
657
- *
658
- * @param {Object} type a Substrait data type
659
- * @return {Field} an unnamed field
660
- */
661
- typeToField(type: LiteralType): Field;
662
- /**
663
- * Convert a named struct to an array of Field
664
- * @param {NamedStruct} struct a Substrait named struct
665
- * @return {Field[]} named fields
666
- */
667
- namedStructToSchema(struct: NamedStruct): Field;
668
- /**
669
- * Extract the properties from a read relation
670
- * @param {Object} read a Substrait read relation
671
- * @return {SimpleProperty[]} properties for the relation
672
- */
673
- readTypeToProps(read: ReadRelation): SimpleProperty[];
674
- /**
675
- * Convert a Substrait read relation to a print node
676
- * @param {Object} read a Substrait read relation
677
- * @return {PrintNode} a print node
678
- */
679
- readToNode(read: ReadRelation): PrintNode;
680
- /**
681
- * True if the object has a field with the given name
682
- * @param {Object} obj the object to test
683
- * @param {string} fieldName the field name to look for
684
- * @return {boolean} the result of the test
685
- */
686
- hasValue(obj: object, fieldName: string): boolean;
687
- /**
688
- * Convert a Substrait fetch relation to a print node
689
- * @param {Object} fetch a Substrait fetch relation
690
- * @return {PrintNode} a print node
691
- */
692
- fetchToNode(fetch: FetchRelation): PrintNode;
693
- /**
694
- * Convert a Substrait sort field to a property
695
- * @param {Object} sortField a Substrait sort field
696
- * @param {Field} schema the schema of the sort input
697
- * @return {SimpleProperty} a property describing the sort
698
- */
699
- sortFieldToStr(sortField: SortField, schema: Field): string | undefined;
700
- /**
701
- * Convert a Substrait sort relation to a print node
702
- * @param {Object} sort a Substrait sort relation
703
- * @return {PrintNode} a print node
704
- */
705
- sortToNode(sort: SortRelation): PrintNode;
706
- /**
707
- * Convert a Substrait aggregate function to a field
708
- * @param {Object} func the Substrait aggregate function
709
- * @param {Field} inp the input field
710
- * @return {Field} a field representation of the function
711
- */
712
- aggregateFunctionToField(func: AggregateFunction, inp: Field): Field;
713
- /**
714
- * Convert a Substrait aggregate relation to a print node
715
- * @param {Object} agg a Substrait aggregate relation
716
- * @return {PrintNode} a print node
717
- */
718
- aggToNode(agg: AggregateRelation): PrintNode;
719
- /**
720
- * Convert a Substrait filter relation to a print node
721
- * @param {Object} filt a Substrait filter relation
722
- * @return {PrintNode} a print node
723
- */
724
- filterToNode(filt: FilterRelation): PrintNode;
725
- /**
726
- * Converts a Substrait join relation to a print node
727
- * @param {Object} join a Substrait join relation
728
- * @return {PrintNode} a print node
729
- */
730
- joinToNode(join: JoinRelation): PrintNode;
731
- /**
732
- * Converts a Substrait relation to a print node
733
- * @param {Object} rel the Substrait relation to convert
734
- * @return {PrintNode} a print node
735
- */
736
- relToNode(rel: Rel): PrintNode;
737
- /**
738
- * Converts a Substrait root relation to a print node
739
- * @param {Object} rel the Substrait relation to convert
740
- * @return {PrintNode} a print node
741
- */
742
- rootRelToNode(rel: RelationRoot): PrintNode;
743
- /**
744
- * Converts a Substrait plan to a print node
745
- * @param {Object} plan the Substrait plan to convert
746
- * @return {PrintNode} a print node
747
- */
748
- planToNode(plan: Plan): PrintNode;
749
- parse(plan: Plan): {
750
- selection: string[];
751
- filters: string[];
752
- logicalOperators: LogicalOperator[];
753
- };
754
- /**
755
- * Converts a base64 string into a decimal number.
756
- *
757
- * @public
758
- * @param {string} base64 - The base64 string to convert.
759
- * @param {number} precision - The total number of digits in the output number.
760
- * @param {number} scale - The number of digits after the decimal point in the output number.
761
- * @throws {Error} Will throw an error if the conversion fails.
762
- * @returns {number} The converted decimal number.
763
- * @example
764
- * // returns 123.45
765
- * this.base64ToDecimal('MTIzNDU=', 5, 2);
766
- */
767
- base64ToDecimal(base64: string, precision: number, scale: number): number;
768
- private deduplicate;
769
- }
770
- export { SubstraitParser };