expr-codegen 0.16.1__tar.gz → 0.16.2__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.
- {expr_codegen-0.16.1 → expr_codegen-0.16.2}/PKG-INFO +1 -1
- expr_codegen-0.16.2/expr_codegen/_version.py +1 -0
- {expr_codegen-0.16.1 → expr_codegen-0.16.2}/expr_codegen/pandas/printer.py +5 -1
- {expr_codegen-0.16.1 → expr_codegen-0.16.2}/expr_codegen/polars/printer.py +5 -1
- {expr_codegen-0.16.1 → expr_codegen-0.16.2}/expr_codegen/rust/printer.py +2 -4
- {expr_codegen-0.16.1 → expr_codegen-0.16.2}/expr_codegen/sql/printer.py +5 -1
- expr_codegen-0.16.1/expr_codegen/_version.py +0 -1
- {expr_codegen-0.16.1 → expr_codegen-0.16.2}/.gitignore +0 -0
- {expr_codegen-0.16.1 → expr_codegen-0.16.2}/LICENSE +0 -0
- {expr_codegen-0.16.1 → expr_codegen-0.16.2}/README.md +0 -0
- {expr_codegen-0.16.1 → expr_codegen-0.16.2}/expr_codegen/__init__.py +0 -0
- {expr_codegen-0.16.1 → expr_codegen-0.16.2}/expr_codegen/codes.py +0 -0
- {expr_codegen-0.16.1 → expr_codegen-0.16.2}/expr_codegen/dag.py +0 -0
- {expr_codegen-0.16.1 → expr_codegen-0.16.2}/expr_codegen/expr.py +0 -0
- {expr_codegen-0.16.1 → expr_codegen-0.16.2}/expr_codegen/latex/__init__.py +0 -0
- {expr_codegen-0.16.1 → expr_codegen-0.16.2}/expr_codegen/latex/printer.py +0 -0
- {expr_codegen-0.16.1 → expr_codegen-0.16.2}/expr_codegen/model.py +0 -0
- {expr_codegen-0.16.1 → expr_codegen-0.16.2}/expr_codegen/pandas/__init__.py +0 -0
- {expr_codegen-0.16.1 → expr_codegen-0.16.2}/expr_codegen/pandas/code.py +0 -0
- {expr_codegen-0.16.1 → expr_codegen-0.16.2}/expr_codegen/pandas/helper.py +0 -0
- {expr_codegen-0.16.1 → expr_codegen-0.16.2}/expr_codegen/pandas/ta.py +0 -0
- {expr_codegen-0.16.1 → expr_codegen-0.16.2}/expr_codegen/pandas/template.py.j2 +0 -0
- {expr_codegen-0.16.1 → expr_codegen-0.16.2}/expr_codegen/polars/__init__.py +0 -0
- {expr_codegen-0.16.1 → expr_codegen-0.16.2}/expr_codegen/polars/code.py +0 -0
- {expr_codegen-0.16.1 → expr_codegen-0.16.2}/expr_codegen/polars/template.py.j2 +0 -0
- {expr_codegen-0.16.1 → expr_codegen-0.16.2}/expr_codegen/rust/__init__.py +0 -0
- {expr_codegen-0.16.1 → expr_codegen-0.16.2}/expr_codegen/rust/code.py +0 -0
- {expr_codegen-0.16.1 → expr_codegen-0.16.2}/expr_codegen/rust/template.rs.j2 +0 -0
- {expr_codegen-0.16.1 → expr_codegen-0.16.2}/expr_codegen/sql/__init__.py +0 -0
- {expr_codegen-0.16.1 → expr_codegen-0.16.2}/expr_codegen/sql/code.py +0 -0
- {expr_codegen-0.16.1 → expr_codegen-0.16.2}/expr_codegen/sql/template.sql.j2 +0 -0
- {expr_codegen-0.16.1 → expr_codegen-0.16.2}/expr_codegen/tool.py +0 -0
- {expr_codegen-0.16.1 → expr_codegen-0.16.2}/pyproject.toml +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.16.2"
|
|
@@ -60,7 +60,11 @@ class PandasStrPrinter(StrPrinter):
|
|
|
60
60
|
|
|
61
61
|
def _print_Equality(self, expr):
|
|
62
62
|
PREC = precedence(expr)
|
|
63
|
-
return "%s
|
|
63
|
+
return "%s == %s" % (self.parenthesize(expr.args[0], PREC), self.parenthesize(expr.args[1], PREC))
|
|
64
|
+
|
|
65
|
+
def _print_Unequality(self, expr):
|
|
66
|
+
PREC = precedence(expr)
|
|
67
|
+
return "%s != %s" % (self.parenthesize(expr.args[0], PREC), self.parenthesize(expr.args[1], PREC))
|
|
64
68
|
|
|
65
69
|
def _print_Or(self, expr):
|
|
66
70
|
PREC = PRECEDENCE["Mul"]
|
|
@@ -58,7 +58,11 @@ class PolarsStrPrinter(StrPrinter):
|
|
|
58
58
|
|
|
59
59
|
def _print_Equality(self, expr):
|
|
60
60
|
PREC = precedence(expr)
|
|
61
|
-
return "%s
|
|
61
|
+
return "%s == %s" % (self.parenthesize(expr.args[0], PREC), self.parenthesize(expr.args[1], PREC))
|
|
62
|
+
|
|
63
|
+
def _print_Unequality(self, expr):
|
|
64
|
+
PREC = precedence(expr)
|
|
65
|
+
return "%s != %s" % (self.parenthesize(expr.args[0], PREC), self.parenthesize(expr.args[1], PREC))
|
|
62
66
|
|
|
63
67
|
def _print_Or(self, expr):
|
|
64
68
|
PREC = PRECEDENCE["Mul"]
|
|
@@ -59,10 +59,6 @@ class RustStrPrinter(StrPrinter):
|
|
|
59
59
|
return expr.name
|
|
60
60
|
return f'col("{expr.name}")'
|
|
61
61
|
|
|
62
|
-
def _print_Equality(self, expr):
|
|
63
|
-
new_args = [f"eq({self._print(arg)})" for arg in expr.args]
|
|
64
|
-
return ".".join(new_args)[2:]
|
|
65
|
-
|
|
66
62
|
def _print_Or(self, expr):
|
|
67
63
|
new_args = [f"or({self._print(arg)})" for arg in expr.args]
|
|
68
64
|
return ".".join(new_args)[2:]
|
|
@@ -103,6 +99,8 @@ class RustStrPrinter(StrPrinter):
|
|
|
103
99
|
def _print_Relational(self, expr):
|
|
104
100
|
|
|
105
101
|
charmap = {
|
|
102
|
+
"==": "eq",
|
|
103
|
+
"!=": "neq",
|
|
106
104
|
"<": "lt",
|
|
107
105
|
">": "gt",
|
|
108
106
|
">=": "gt_eq",
|
|
@@ -94,7 +94,11 @@ class SQLStrPrinter(StrPrinter):
|
|
|
94
94
|
|
|
95
95
|
def _print_Equality(self, expr):
|
|
96
96
|
PREC = precedence(expr)
|
|
97
|
-
return "%s
|
|
97
|
+
return "%s = %s" % (self.parenthesize(expr.args[0], PREC), self.parenthesize(expr.args[1], PREC))
|
|
98
|
+
|
|
99
|
+
def _print_Unequality(self, expr):
|
|
100
|
+
PREC = precedence(expr)
|
|
101
|
+
return "%s <> %s" % (self.parenthesize(expr.args[0], PREC), self.parenthesize(expr.args[1], PREC))
|
|
98
102
|
|
|
99
103
|
def _print_Or(self, expr):
|
|
100
104
|
PREC = PRECEDENCE["Mul"]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.16.1"
|
|
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
|