pytrilogy 0.0.2.51__tar.gz → 0.0.2.53__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.51/pytrilogy.egg-info → pytrilogy-0.0.2.53}/PKG-INFO +1 -1
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53/pytrilogy.egg-info}/PKG-INFO +1 -1
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/__init__.py +1 -1
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/parsing/render.py +12 -1
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/LICENSE.md +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/README.md +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/pyproject.toml +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/pytrilogy.egg-info/SOURCES.txt +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/pytrilogy.egg-info/dependency_links.txt +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/pytrilogy.egg-info/entry_points.txt +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/pytrilogy.egg-info/requires.txt +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/pytrilogy.egg-info/top_level.txt +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/setup.cfg +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/setup.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/tests/test_datatypes.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/tests/test_declarations.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/tests/test_derived_concepts.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/tests/test_discovery_nodes.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/tests/test_enums.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/tests/test_environment.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/tests/test_executor.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/tests/test_functions.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/tests/test_imports.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/tests/test_metadata.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/tests/test_models.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/tests/test_multi_join_assignments.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/tests/test_parse_engine.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/tests/test_parsing.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/tests/test_partial_handling.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/tests/test_query_processing.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/tests/test_select.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/tests/test_show.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/tests/test_statements.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/tests/test_undefined_concept.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/tests/test_where_clause.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/compiler.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/constants.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/__init__.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/constants.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/enums.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/env_processor.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/environment_helpers.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/ergonomics.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/exceptions.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/functions.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/graph_models.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/internal.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/models.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/optimization.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/optimizations/__init__.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/optimizations/base_optimization.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/optimizations/inline_constant.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/optimizations/inline_datasource.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/optimizations/predicate_pushdown.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/__init__.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/concept_strategies_v3.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/graph_utils.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/node_generators/__init__.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/node_generators/basic_node.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/node_generators/common.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/node_generators/filter_node.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/node_generators/group_node.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/node_generators/group_to_node.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/node_generators/multiselect_node.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/node_generators/node_merge_node.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/node_generators/rowset_node.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/node_generators/select_helpers/__init__.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/node_generators/select_helpers/datasource_injection.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/node_generators/select_merge_node.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/node_generators/select_node.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/node_generators/union_node.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/node_generators/unnest_node.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/node_generators/window_node.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/nodes/__init__.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/nodes/base_node.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/nodes/filter_node.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/nodes/group_node.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/nodes/merge_node.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/nodes/select_node_v2.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/nodes/union_node.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/nodes/unnest_node.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/nodes/window_node.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/utility.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/query_processor.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/dialect/__init__.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/dialect/base.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/dialect/bigquery.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/dialect/common.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/dialect/config.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/dialect/duckdb.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/dialect/enums.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/dialect/postgres.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/dialect/presto.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/dialect/snowflake.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/dialect/sql_server.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/engine.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/executor.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/hooks/__init__.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/hooks/base_hook.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/hooks/graph_hook.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/hooks/query_debugger.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/metadata/__init__.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/parser.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/parsing/__init__.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/parsing/common.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/parsing/config.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/parsing/exceptions.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/parsing/helpers.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/parsing/parse_engine.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/parsing/trilogy.lark +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/py.typed +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/scripts/__init__.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/scripts/trilogy.py +0 -0
- {pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/utility.py +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from collections import defaultdict
|
|
2
|
+
from datetime import date, datetime
|
|
2
3
|
from functools import singledispatchmethod
|
|
3
4
|
|
|
4
5
|
from jinja2 import Template
|
|
@@ -147,7 +148,7 @@ class Renderer:
|
|
|
147
148
|
base = f"""datasource {arg.name} (
|
|
148
149
|
{assignments}
|
|
149
150
|
)
|
|
150
|
-
{self.to_string(arg.grain)}{non_partial}
|
|
151
|
+
{self.to_string(arg.grain) if arg.grain.components else ''}{non_partial}
|
|
151
152
|
{self.to_string(arg.address)}"""
|
|
152
153
|
|
|
153
154
|
if arg.where:
|
|
@@ -273,6 +274,14 @@ class Renderer:
|
|
|
273
274
|
def _(self, arg: DataType):
|
|
274
275
|
return arg.value
|
|
275
276
|
|
|
277
|
+
@to_string.register
|
|
278
|
+
def _(self, arg: date):
|
|
279
|
+
return f"'{arg.isoformat()}'::date"
|
|
280
|
+
|
|
281
|
+
@to_string.register
|
|
282
|
+
def _(self, arg: datetime):
|
|
283
|
+
return f"'{arg.isoformat()}'::datetime"
|
|
284
|
+
|
|
276
285
|
@to_string.register
|
|
277
286
|
def _(self, arg: ConceptDerivation):
|
|
278
287
|
# this is identical rendering;
|
|
@@ -408,6 +417,8 @@ class Renderer:
|
|
|
408
417
|
return " / ".join(args)
|
|
409
418
|
if arg.operator == FunctionType.MOD:
|
|
410
419
|
return f"{args[0]} % {args[1]}"
|
|
420
|
+
if arg.operator == FunctionType.PARENTHETICAL:
|
|
421
|
+
return f"({args[0]})"
|
|
411
422
|
|
|
412
423
|
inputs = ",".join(args)
|
|
413
424
|
|
|
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
|
|
File without changes
|
{pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/node_generators/__init__.py
RENAMED
|
File without changes
|
{pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/node_generators/basic_node.py
RENAMED
|
File without changes
|
|
File without changes
|
{pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/node_generators/filter_node.py
RENAMED
|
File without changes
|
{pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/node_generators/group_node.py
RENAMED
|
File without changes
|
{pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/node_generators/group_to_node.py
RENAMED
|
File without changes
|
|
File without changes
|
{pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/node_generators/node_merge_node.py
RENAMED
|
File without changes
|
{pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/node_generators/rowset_node.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/node_generators/select_node.py
RENAMED
|
File without changes
|
{pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/node_generators/union_node.py
RENAMED
|
File without changes
|
{pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/trilogy/core/processing/node_generators/unnest_node.py
RENAMED
|
File without changes
|
{pytrilogy-0.0.2.51 → pytrilogy-0.0.2.53}/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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|