pytrilogy 0.0.3.120__py3-none-any.whl → 0.0.3.121__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 pytrilogy might be problematic. Click here for more details.
- {pytrilogy-0.0.3.120.dist-info → pytrilogy-0.0.3.121.dist-info}/METADATA +1 -1
- {pytrilogy-0.0.3.120.dist-info → pytrilogy-0.0.3.121.dist-info}/RECORD +10 -10
- trilogy/__init__.py +1 -1
- trilogy/core/models/author.py +4 -9
- trilogy/dialect/duckdb.py +1 -0
- trilogy/parsing/parse_engine.py +1 -0
- {pytrilogy-0.0.3.120.dist-info → pytrilogy-0.0.3.121.dist-info}/WHEEL +0 -0
- {pytrilogy-0.0.3.120.dist-info → pytrilogy-0.0.3.121.dist-info}/entry_points.txt +0 -0
- {pytrilogy-0.0.3.120.dist-info → pytrilogy-0.0.3.121.dist-info}/licenses/LICENSE.md +0 -0
- {pytrilogy-0.0.3.120.dist-info → pytrilogy-0.0.3.121.dist-info}/top_level.txt +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
pytrilogy-0.0.3.
|
|
2
|
-
trilogy/__init__.py,sha256=
|
|
1
|
+
pytrilogy-0.0.3.121.dist-info/licenses/LICENSE.md,sha256=5ZRvtTyCCFwz1THxDTjAu3Lidds9WjPvvzgVwPSYNDo,1042
|
|
2
|
+
trilogy/__init__.py,sha256=ioAcoV-BKlkqqPoHt2LnYLJorjamhK6uRkObUCvwA20,304
|
|
3
3
|
trilogy/constants.py,sha256=_Tm7YGaAZuxH77X5ve0TajU0dQD7RcGV6ECrTHRL3qQ,2678
|
|
4
4
|
trilogy/engine.py,sha256=v4TpNktM4zZ9OX7jZH2nde4dpX5uAH2U23ELfULTCSg,2280
|
|
5
5
|
trilogy/executor.py,sha256=uKlCnPp4FHkgsa_dDcQJ4y-ObtvKat2KFx05c-z1mZo,17885
|
|
@@ -35,7 +35,7 @@ trilogy/core/optimization.py,sha256=eKieOaWXUtoNTVQbThGA5tqrI06ZR6SUFOqGe4Jw0k4,
|
|
|
35
35
|
trilogy/core/query_processor.py,sha256=rMrtLSQxVm7yeyh0nWjDNI9nnu4Xi0NgHvBJ14gvu4I,20384
|
|
36
36
|
trilogy/core/utility.py,sha256=3VC13uSQWcZNghgt7Ot0ZTeEmNqs__cx122abVq9qhM,410
|
|
37
37
|
trilogy/core/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
38
|
-
trilogy/core/models/author.py,sha256=
|
|
38
|
+
trilogy/core/models/author.py,sha256=H6Jb6SzOdl3jY1P_P1NsPRW9ukUmxzDXB8RNd7Ieky0,85978
|
|
39
39
|
trilogy/core/models/build.py,sha256=zVHD8jo8V8E0aGWtobzXG7hY3VjLChiW4s1QBx9sD5k,72938
|
|
40
40
|
trilogy/core/models/build_environment.py,sha256=mpx7MKGc60fnZLVdeLi2YSREy7eQbQYycCrP4zF-rHU,5258
|
|
41
41
|
trilogy/core/models/core.py,sha256=mv1QOxf-6uGoWpfwuucNAW3W_ZZGQuxtnPWAXhQsxSI,13290
|
|
@@ -100,7 +100,7 @@ trilogy/dialect/bigquery.py,sha256=XS3hpybeowgfrOrkycAigAF3NX2YUzTzfgE6f__2fT4,4
|
|
|
100
100
|
trilogy/dialect/common.py,sha256=I5Ku_TR5MwJTB3ZhcQenrtvXhH2RvTQ8wQe9w5lfkfA,5708
|
|
101
101
|
trilogy/dialect/config.py,sha256=olnyeVU5W5T6b9-dMeNAnvxuPlyc2uefb7FRME094Ec,3834
|
|
102
102
|
trilogy/dialect/dataframe.py,sha256=nDTHMSd7GiGjEhjAobrZND0w4zjr-vgOalM2Cdxjets,1596
|
|
103
|
-
trilogy/dialect/duckdb.py,sha256=
|
|
103
|
+
trilogy/dialect/duckdb.py,sha256=Xycopzbfo6VyuNVrh2IdeL_HzWgyP0poKRbtoxNjDHA,6374
|
|
104
104
|
trilogy/dialect/enums.py,sha256=FRNYQ5-w-B6-X0yXKNU5g9GowsMlERFogTC5u2nxL_s,4740
|
|
105
105
|
trilogy/dialect/metadata.py,sha256=p_V-MYPQ2iR6fcTjagnptCIWtsZe4fTfoS_iXpavPzY,7098
|
|
106
106
|
trilogy/dialect/postgres.py,sha256=el2PKwfyvWGk5EZtLudqAH5ewLitY1sFHJiocBSyxyM,3393
|
|
@@ -117,7 +117,7 @@ trilogy/parsing/common.py,sha256=GijDRpysULL6vQWpFcjgxVASuTWXUVUi5fILHvjzkbg,355
|
|
|
117
117
|
trilogy/parsing/config.py,sha256=Z-DaefdKhPDmSXLgg5V4pebhSB0h590vI0_VtHnlukI,111
|
|
118
118
|
trilogy/parsing/exceptions.py,sha256=Xwwsv2C9kSNv2q-HrrKC1f60JNHShXcCMzstTSEbiCw,154
|
|
119
119
|
trilogy/parsing/helpers.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
120
|
-
trilogy/parsing/parse_engine.py,sha256=
|
|
120
|
+
trilogy/parsing/parse_engine.py,sha256=6oknUq7fibJAKMHUtC1cbBkWkU-r75XU20tfyjCQdes,87662
|
|
121
121
|
trilogy/parsing/render.py,sha256=k7MNp8EBTqVBSVqFlgTHSwIhfSKLyJfSeb2fSbt9dVA,24307
|
|
122
122
|
trilogy/parsing/trilogy.lark,sha256=_FW9Hq7Xo6KDrf1JUxD9NBM0Zn9OyoZzWHj97zFqy-M,17449
|
|
123
123
|
trilogy/scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -133,8 +133,8 @@ trilogy/std/net.preql,sha256=WZCuvH87_rZntZiuGJMmBDMVKkdhTtxeHOkrXNwJ1EE,416
|
|
|
133
133
|
trilogy/std/ranking.preql,sha256=zDdmHcTerlCjaHDdVyjGTgcc2hAhnlDM_q5tiw0MPGE,108
|
|
134
134
|
trilogy/std/report.preql,sha256=LbV-XlHdfw0jgnQ8pV7acG95xrd1-p65fVpiIc-S7W4,202
|
|
135
135
|
trilogy/std/semantic.preql,sha256=k9_k672nUb5MKjSD1DW5jjn_odoYHl0yNeRPOjFabsE,95
|
|
136
|
-
pytrilogy-0.0.3.
|
|
137
|
-
pytrilogy-0.0.3.
|
|
138
|
-
pytrilogy-0.0.3.
|
|
139
|
-
pytrilogy-0.0.3.
|
|
140
|
-
pytrilogy-0.0.3.
|
|
136
|
+
pytrilogy-0.0.3.121.dist-info/METADATA,sha256=eNCGHIW6_9XmDhoM4CcLmCYjjEgVD9h8ltJk8jFexMM,12911
|
|
137
|
+
pytrilogy-0.0.3.121.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
138
|
+
pytrilogy-0.0.3.121.dist-info/entry_points.txt,sha256=ewBPU2vLnVexZVnB-NrVj-p3E-4vukg83Zk8A55Wp2w,56
|
|
139
|
+
pytrilogy-0.0.3.121.dist-info/top_level.txt,sha256=cAy__NW_eMAa_yT9UnUNlZLFfxcg6eimUAZ184cdNiE,8
|
|
140
|
+
pytrilogy-0.0.3.121.dist-info/RECORD,,
|
trilogy/__init__.py
CHANGED
trilogy/core/models/author.py
CHANGED
|
@@ -162,14 +162,13 @@ class ConceptRef(Addressable, Namespaced, DataTyped, Mergeable, BaseModel):
|
|
|
162
162
|
)
|
|
163
163
|
|
|
164
164
|
def with_reference_replacement(self, source: str, target: Expr | ArgBinding):
|
|
165
|
-
if self.address == source:
|
|
166
|
-
return target
|
|
167
|
-
|
|
168
165
|
# a reference might be to an attribute of a struct that is bound late
|
|
169
166
|
# if the replacement is a parent in the access path; replace reference
|
|
170
167
|
# with an attribute access call
|
|
171
|
-
candidates = [f"
|
|
168
|
+
candidates = [f"{DEFAULT_NAMESPACE}.{self.address}", self.address]
|
|
172
169
|
for candidate in candidates:
|
|
170
|
+
if candidate == source:
|
|
171
|
+
return target
|
|
173
172
|
if not candidate.startswith(f"{source}."):
|
|
174
173
|
continue
|
|
175
174
|
attribute = self.address.rsplit(".", 1)[1]
|
|
@@ -2535,11 +2534,7 @@ class CustomFunctionFactory:
|
|
|
2535
2534
|
target = f"{DEFAULT_NAMESPACE}.{self.function_arguments[idx].name}"
|
|
2536
2535
|
else:
|
|
2537
2536
|
target = self.function_arguments[idx].name
|
|
2538
|
-
nout = (
|
|
2539
|
-
nout.with_reference_replacement(target, x)
|
|
2540
|
-
if isinstance(nout, Mergeable)
|
|
2541
|
-
else nout
|
|
2542
|
-
)
|
|
2537
|
+
nout = nout.with_reference_replacement(target, x)
|
|
2543
2538
|
return nout
|
|
2544
2539
|
|
|
2545
2540
|
|
trilogy/dialect/duckdb.py
CHANGED
|
@@ -104,6 +104,7 @@ FUNCTION_MAP = {
|
|
|
104
104
|
FunctionType.CONCAT: lambda x: f"({' || '.join(x)})",
|
|
105
105
|
FunctionType.DATE_LITERAL: lambda x: f"date '{x}'",
|
|
106
106
|
FunctionType.DATETIME_LITERAL: lambda x: f"datetime '{x}'",
|
|
107
|
+
FunctionType.DAY_OF_WEEK: lambda x: f"dayofweek({x[0]})",
|
|
107
108
|
# string
|
|
108
109
|
FunctionType.CONTAINS: lambda x: f"CONTAINS(LOWER({x[0]}), LOWER({x[1]}))",
|
|
109
110
|
# regexp
|
trilogy/parsing/parse_engine.py
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|