vtlengine 1.0.3rc3__py3-none-any.whl → 1.1__py3-none-any.whl
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.
Potentially problematic release.
This version of vtlengine might be problematic. Click here for more details.
- vtlengine/API/_InternalApi.py +288 -61
- vtlengine/API/__init__.py +269 -71
- vtlengine/API/data/schema/json_schema_2.1.json +116 -0
- vtlengine/AST/ASTComment.py +56 -0
- vtlengine/AST/ASTConstructor.py +76 -22
- vtlengine/AST/ASTConstructorModules/Expr.py +238 -120
- vtlengine/AST/ASTConstructorModules/ExprComponents.py +126 -61
- vtlengine/AST/ASTConstructorModules/Terminals.py +97 -42
- vtlengine/AST/ASTConstructorModules/__init__.py +50 -0
- vtlengine/AST/ASTEncoders.py +5 -1
- vtlengine/AST/ASTString.py +608 -0
- vtlengine/AST/ASTTemplate.py +28 -2
- vtlengine/AST/DAG/__init__.py +10 -4
- vtlengine/AST/Grammar/lexer.py +0 -1
- vtlengine/AST/Grammar/parser.py +185 -440
- vtlengine/AST/VtlVisitor.py +0 -1
- vtlengine/AST/__init__.py +127 -14
- vtlengine/DataTypes/TimeHandling.py +50 -15
- vtlengine/DataTypes/__init__.py +79 -7
- vtlengine/Exceptions/__init__.py +3 -5
- vtlengine/Exceptions/messages.py +74 -105
- vtlengine/Interpreter/__init__.py +136 -46
- vtlengine/Model/__init__.py +14 -11
- vtlengine/Operators/Aggregation.py +17 -9
- vtlengine/Operators/Analytic.py +64 -20
- vtlengine/Operators/Assignment.py +0 -1
- vtlengine/Operators/CastOperator.py +44 -44
- vtlengine/Operators/Clause.py +16 -10
- vtlengine/Operators/Comparison.py +20 -12
- vtlengine/Operators/Conditional.py +47 -15
- vtlengine/Operators/General.py +9 -4
- vtlengine/Operators/HROperators.py +4 -14
- vtlengine/Operators/Join.py +15 -14
- vtlengine/Operators/Numeric.py +32 -26
- vtlengine/Operators/RoleSetter.py +6 -2
- vtlengine/Operators/Set.py +12 -8
- vtlengine/Operators/String.py +9 -9
- vtlengine/Operators/Time.py +145 -124
- vtlengine/Operators/Validation.py +10 -4
- vtlengine/Operators/__init__.py +56 -69
- vtlengine/Utils/__init__.py +55 -1
- vtlengine/__extras_check.py +17 -0
- vtlengine/__init__.py +2 -2
- vtlengine/files/output/__init__.py +2 -1
- vtlengine/files/output/_time_period_representation.py +2 -1
- vtlengine/files/parser/__init__.py +52 -46
- vtlengine/files/parser/_time_checking.py +4 -4
- {vtlengine-1.0.3rc3.dist-info → vtlengine-1.1.dist-info}/METADATA +21 -17
- vtlengine-1.1.dist-info/RECORD +61 -0
- {vtlengine-1.0.3rc3.dist-info → vtlengine-1.1.dist-info}/WHEEL +1 -1
- vtlengine/DataTypes/NumericTypesHandling.py +0 -38
- vtlengine-1.0.3rc3.dist-info/RECORD +0 -58
- {vtlengine-1.0.3rc3.dist-info → vtlengine-1.1.dist-info}/LICENSE.md +0 -0
vtlengine/AST/DAG/__init__.py
CHANGED
|
@@ -85,10 +85,13 @@ class DAGAnalyzer(ASTTemplate):
|
|
|
85
85
|
all_output = []
|
|
86
86
|
global_inputs = []
|
|
87
87
|
inserted = []
|
|
88
|
+
persistent_datasets = []
|
|
88
89
|
for key, statement in self.dependencies.items():
|
|
89
90
|
outputs = statement[OUTPUTS]
|
|
90
91
|
persistent = statement[PERSISTENT]
|
|
91
92
|
reference = outputs + persistent
|
|
93
|
+
if len(persistent) == 1 and persistent[0] not in persistent_datasets:
|
|
94
|
+
persistent_datasets.append(persistent[0])
|
|
92
95
|
deletion_key = key
|
|
93
96
|
all_output.append(reference[0])
|
|
94
97
|
for subKey, subStatement in self.dependencies.items():
|
|
@@ -127,10 +130,11 @@ class DAGAnalyzer(ASTTemplate):
|
|
|
127
130
|
statements[INSERT][key] = [element]
|
|
128
131
|
|
|
129
132
|
statements[GLOBAL] = global_inputs
|
|
133
|
+
statements[PERSISTENT] = persistent_datasets
|
|
130
134
|
return statements
|
|
131
135
|
|
|
132
136
|
@classmethod
|
|
133
|
-
def createDAG(cls, ast:
|
|
137
|
+
def createDAG(cls, ast: Start):
|
|
134
138
|
""" """
|
|
135
139
|
# Visit AST.
|
|
136
140
|
dag = cls()
|
|
@@ -143,6 +147,11 @@ class DAGAnalyzer(ASTTemplate):
|
|
|
143
147
|
# Create output dict.
|
|
144
148
|
if len(dag.edges) != 0:
|
|
145
149
|
dag.sortAST(ast)
|
|
150
|
+
else:
|
|
151
|
+
MLStatements: list = [
|
|
152
|
+
ML for ML in ast.children if not isinstance(ML, (HRuleset, DPRuleset, Operator))
|
|
153
|
+
]
|
|
154
|
+
dag.check_overwriting(MLStatements)
|
|
146
155
|
return dag
|
|
147
156
|
|
|
148
157
|
except nx.NetworkXUnfeasible as error:
|
|
@@ -300,7 +309,6 @@ class DAGAnalyzer(ASTTemplate):
|
|
|
300
309
|
self.visit(node.right)
|
|
301
310
|
|
|
302
311
|
def visit_RegularAggregation(self, node: RegularAggregation) -> None:
|
|
303
|
-
|
|
304
312
|
self.visit(node.dataset)
|
|
305
313
|
for child in node.children:
|
|
306
314
|
self.isFromRegularAggregation = True
|
|
@@ -329,7 +337,6 @@ class DAGAnalyzer(ASTTemplate):
|
|
|
329
337
|
self.inputs.append(node.value)
|
|
330
338
|
|
|
331
339
|
def visit_ParamOp(self, node: ParamOp) -> None:
|
|
332
|
-
|
|
333
340
|
if self.udos and node.op in self.udos:
|
|
334
341
|
DO_AST: Operator = self.udos[node.op]
|
|
335
342
|
|
|
@@ -426,7 +433,6 @@ class HRDAGAnalyzer(DAGAnalyzer):
|
|
|
426
433
|
# def visit_Identifier(self, node: Identifier) -> None:
|
|
427
434
|
if node.kind == "CodeItemID": # and node.value not in self.alias:
|
|
428
435
|
if self.isFirstAssignment:
|
|
429
|
-
|
|
430
436
|
self.isFirstAssignment = False
|
|
431
437
|
self.outputs.append(node.value)
|
|
432
438
|
else:
|