pytrilogy 0.0.2.39__tar.gz → 0.0.2.40__tar.gz
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 pytrilogy might be problematic. Click here for more details.
- {pytrilogy-0.0.2.39/pytrilogy.egg-info → pytrilogy-0.0.2.40}/PKG-INFO +1 -1
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40/pytrilogy.egg-info}/PKG-INFO +1 -1
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/__init__.py +1 -1
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/models.py +3 -3
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/dialect/base.py +4 -4
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/parsing/parse_engine.py +4 -4
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/parsing/render.py +4 -4
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/LICENSE.md +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/README.md +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/pyproject.toml +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/pytrilogy.egg-info/SOURCES.txt +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/pytrilogy.egg-info/dependency_links.txt +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/pytrilogy.egg-info/entry_points.txt +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/pytrilogy.egg-info/requires.txt +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/pytrilogy.egg-info/top_level.txt +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/setup.cfg +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/setup.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/tests/test_datatypes.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/tests/test_declarations.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/tests/test_derived_concepts.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/tests/test_discovery_nodes.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/tests/test_enums.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/tests/test_environment.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/tests/test_executor.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/tests/test_functions.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/tests/test_imports.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/tests/test_metadata.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/tests/test_models.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/tests/test_multi_join_assignments.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/tests/test_parse_engine.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/tests/test_parsing.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/tests/test_partial_handling.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/tests/test_query_processing.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/tests/test_select.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/tests/test_show.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/tests/test_statements.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/tests/test_undefined_concept.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/tests/test_where_clause.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/compiler.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/constants.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/__init__.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/constants.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/enums.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/env_processor.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/environment_helpers.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/ergonomics.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/exceptions.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/functions.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/graph_models.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/internal.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/optimization.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/optimizations/__init__.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/optimizations/base_optimization.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/optimizations/inline_constant.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/optimizations/inline_datasource.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/optimizations/predicate_pushdown.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/processing/__init__.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/processing/concept_strategies_v3.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/processing/graph_utils.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/processing/node_generators/__init__.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/processing/node_generators/basic_node.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/processing/node_generators/common.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/processing/node_generators/filter_node.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/processing/node_generators/group_node.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/processing/node_generators/group_to_node.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/processing/node_generators/multiselect_node.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/processing/node_generators/node_merge_node.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/processing/node_generators/rowset_node.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/processing/node_generators/select_merge_node.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/processing/node_generators/select_node.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/processing/node_generators/unnest_node.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/processing/node_generators/window_node.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/processing/nodes/__init__.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/processing/nodes/base_node.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/processing/nodes/filter_node.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/processing/nodes/group_node.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/processing/nodes/merge_node.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/processing/nodes/select_node_v2.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/processing/nodes/unnest_node.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/processing/nodes/window_node.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/processing/utility.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/query_processor.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/dialect/__init__.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/dialect/bigquery.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/dialect/common.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/dialect/config.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/dialect/duckdb.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/dialect/enums.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/dialect/postgres.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/dialect/presto.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/dialect/snowflake.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/dialect/sql_server.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/engine.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/executor.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/hooks/__init__.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/hooks/base_hook.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/hooks/graph_hook.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/hooks/query_debugger.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/metadata/__init__.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/parser.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/parsing/__init__.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/parsing/common.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/parsing/config.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/parsing/exceptions.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/parsing/helpers.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/parsing/trilogy.lark +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/py.typed +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/scripts/__init__.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/scripts/trilogy.py +0 -0
- {pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/utility.py +0 -0
|
@@ -448,8 +448,8 @@ class Concept(Mergeable, Namespaced, SelectContext, BaseModel):
|
|
|
448
448
|
] = None
|
|
449
449
|
namespace: Optional[str] = Field(default=DEFAULT_NAMESPACE, validate_default=True)
|
|
450
450
|
keys: Optional[Tuple["Concept", ...]] = None
|
|
451
|
-
grain: "Grain" = Field(default=None, validate_default=True)
|
|
452
|
-
modifiers:
|
|
451
|
+
grain: "Grain" = Field(default=None, validate_default=True) # type: ignore
|
|
452
|
+
modifiers: List[Modifier] = Field(default_factory=list) # type: ignore
|
|
453
453
|
pseudonyms: set[str] = Field(default_factory=set)
|
|
454
454
|
_address_cache: str | None = None
|
|
455
455
|
|
|
@@ -3372,7 +3372,7 @@ class Environment(BaseModel):
|
|
|
3372
3372
|
functions: Dict[str, Function] = Field(default_factory=dict)
|
|
3373
3373
|
data_types: Dict[str, DataType] = Field(default_factory=dict)
|
|
3374
3374
|
imports: Dict[str, list[ImportStatement]] = Field(
|
|
3375
|
-
default_factory=lambda: defaultdict(list)
|
|
3375
|
+
default_factory=lambda: defaultdict(list) # type: ignore
|
|
3376
3376
|
)
|
|
3377
3377
|
namespace: str = DEFAULT_NAMESPACE
|
|
3378
3378
|
working_path: str | Path = Field(default_factory=lambda: os.getcwd())
|
|
@@ -138,10 +138,10 @@ FUNCTION_MAP = {
|
|
|
138
138
|
FunctionType.STRUCT: lambda x: f"{{{', '.join(struct_arg(x))}}}",
|
|
139
139
|
FunctionType.ARRAY: lambda x: f"[{', '.join(x)}]",
|
|
140
140
|
# math
|
|
141
|
-
FunctionType.ADD: lambda x:
|
|
142
|
-
FunctionType.SUBTRACT: lambda x:
|
|
143
|
-
FunctionType.DIVIDE: lambda x:
|
|
144
|
-
FunctionType.MULTIPLY: lambda x:
|
|
141
|
+
FunctionType.ADD: lambda x: " + ".join(x),
|
|
142
|
+
FunctionType.SUBTRACT: lambda x: " - ".join(x),
|
|
143
|
+
FunctionType.DIVIDE: lambda x: " / ".join(x),
|
|
144
|
+
FunctionType.MULTIPLY: lambda x: " * ".join(x),
|
|
145
145
|
FunctionType.ROUND: lambda x: f"round({x[0]},{x[1]})",
|
|
146
146
|
FunctionType.MOD: lambda x: f"({x[0]} % {x[1]})",
|
|
147
147
|
# aggregate types
|
|
@@ -1777,7 +1777,7 @@ class ParseToObjects(Transformer):
|
|
|
1777
1777
|
output_datatype=output_datatype,
|
|
1778
1778
|
output_purpose=function_args_to_output_purpose(args),
|
|
1779
1779
|
valid_inputs={DataType.INTEGER, DataType.FLOAT, DataType.NUMBER},
|
|
1780
|
-
arg_count
|
|
1780
|
+
arg_count=-1,
|
|
1781
1781
|
)
|
|
1782
1782
|
|
|
1783
1783
|
@v_args(meta=True)
|
|
@@ -1790,7 +1790,7 @@ class ParseToObjects(Transformer):
|
|
|
1790
1790
|
output_datatype=output_datatype,
|
|
1791
1791
|
output_purpose=function_args_to_output_purpose(args),
|
|
1792
1792
|
valid_inputs={DataType.INTEGER, DataType.FLOAT, DataType.NUMBER},
|
|
1793
|
-
arg_count
|
|
1793
|
+
arg_count=-1,
|
|
1794
1794
|
)
|
|
1795
1795
|
|
|
1796
1796
|
@v_args(meta=True)
|
|
@@ -1803,7 +1803,7 @@ class ParseToObjects(Transformer):
|
|
|
1803
1803
|
output_datatype=output_datatype,
|
|
1804
1804
|
output_purpose=function_args_to_output_purpose(args),
|
|
1805
1805
|
valid_inputs={DataType.INTEGER, DataType.FLOAT, DataType.NUMBER},
|
|
1806
|
-
arg_count
|
|
1806
|
+
arg_count=-1,
|
|
1807
1807
|
)
|
|
1808
1808
|
|
|
1809
1809
|
@v_args(meta=True)
|
|
@@ -1817,7 +1817,7 @@ class ParseToObjects(Transformer):
|
|
|
1817
1817
|
output_datatype=DataType.FLOAT, # division always returns a float
|
|
1818
1818
|
output_purpose=function_args_to_output_purpose(args),
|
|
1819
1819
|
valid_inputs={DataType.INTEGER, DataType.FLOAT, DataType.NUMBER},
|
|
1820
|
-
arg_count
|
|
1820
|
+
arg_count=-1,
|
|
1821
1821
|
)
|
|
1822
1822
|
|
|
1823
1823
|
@v_args(meta=True)
|
|
@@ -395,13 +395,13 @@ class Renderer:
|
|
|
395
395
|
args = [self.to_string(c) for c in arg.arguments]
|
|
396
396
|
|
|
397
397
|
if arg.operator == FunctionType.SUBTRACT:
|
|
398
|
-
return
|
|
398
|
+
return " - ".join(args)
|
|
399
399
|
if arg.operator == FunctionType.ADD:
|
|
400
|
-
return
|
|
400
|
+
return " + ".join(args)
|
|
401
401
|
if arg.operator == FunctionType.MULTIPLY:
|
|
402
|
-
return
|
|
402
|
+
return " * ".join(args)
|
|
403
403
|
if arg.operator == FunctionType.DIVIDE:
|
|
404
|
-
return
|
|
404
|
+
return " / ".join(args)
|
|
405
405
|
if arg.operator == FunctionType.MOD:
|
|
406
406
|
return f"{args[0]} % {args[1]}"
|
|
407
407
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/processing/node_generators/__init__.py
RENAMED
|
File without changes
|
{pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/processing/node_generators/basic_node.py
RENAMED
|
File without changes
|
|
File without changes
|
{pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/processing/node_generators/filter_node.py
RENAMED
|
File without changes
|
{pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/processing/node_generators/group_node.py
RENAMED
|
File without changes
|
{pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/processing/node_generators/group_to_node.py
RENAMED
|
File without changes
|
|
File without changes
|
{pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/processing/node_generators/node_merge_node.py
RENAMED
|
File without changes
|
{pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/processing/node_generators/rowset_node.py
RENAMED
|
File without changes
|
|
File without changes
|
{pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/processing/node_generators/select_node.py
RENAMED
|
File without changes
|
{pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/processing/node_generators/unnest_node.py
RENAMED
|
File without changes
|
{pytrilogy-0.0.2.39 → pytrilogy-0.0.2.40}/trilogy/core/processing/node_generators/window_node.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|