feat(checker): add comparison binary ops on columns
This commit is contained in:
@@ -136,6 +136,30 @@ class ColumnMethodRegistry(MethodRegistry[Call]):
|
|||||||
def pow(self, call: Call) -> Type:
|
def pow(self, call: Call) -> Type:
|
||||||
return self._element_wise(call, "__pow__")
|
return self._element_wise(call, "__pow__")
|
||||||
|
|
||||||
|
@method("lt", "__lt__")
|
||||||
|
def lt(self, call: Call) -> Type:
|
||||||
|
return self._element_wise(call, "__lt__")
|
||||||
|
|
||||||
|
@method("gt", "__gt__")
|
||||||
|
def gt(self, call: Call) -> Type:
|
||||||
|
return self._element_wise(call, "__gt__")
|
||||||
|
|
||||||
|
@method("le", "__le__")
|
||||||
|
def le(self, call: Call) -> Type:
|
||||||
|
return self._element_wise(call, "__le__")
|
||||||
|
|
||||||
|
@method("ge", "__ge__")
|
||||||
|
def ge(self, call: Call) -> Type:
|
||||||
|
return self._element_wise(call, "__ge__")
|
||||||
|
|
||||||
|
@method("ne", "__ne__")
|
||||||
|
def ne(self, call: Call) -> Type:
|
||||||
|
return self._element_wise(call, "__ne__")
|
||||||
|
|
||||||
|
@method("eq", "__eq__")
|
||||||
|
def eq(self, call: Call) -> Type:
|
||||||
|
return self._element_wise(call, "__eq__")
|
||||||
|
|
||||||
@method()
|
@method()
|
||||||
def mean(self, call: Call) -> Type:
|
def mean(self, call: Call) -> Type:
|
||||||
signature = Function(
|
signature = Function(
|
||||||
|
|||||||
@@ -1,174 +1,5 @@
|
|||||||
{
|
{
|
||||||
"diagnostics": [
|
"diagnostics": [],
|
||||||
{
|
|
||||||
"type": "Warning",
|
|
||||||
"location": {
|
|
||||||
"start": [
|
|
||||||
16,
|
|
||||||
4
|
|
||||||
],
|
|
||||||
"end": [
|
|
||||||
16,
|
|
||||||
13
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"message": "Unknown method __lt__ on Column[int]"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Warning",
|
|
||||||
"location": {
|
|
||||||
"start": [
|
|
||||||
16,
|
|
||||||
4
|
|
||||||
],
|
|
||||||
"end": [
|
|
||||||
16,
|
|
||||||
13
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"message": "Unknown method __lt__ on Column[float]"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Warning",
|
|
||||||
"location": {
|
|
||||||
"start": [
|
|
||||||
17,
|
|
||||||
4
|
|
||||||
],
|
|
||||||
"end": [
|
|
||||||
17,
|
|
||||||
13
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"message": "Unknown method __gt__ on Column[int]"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Warning",
|
|
||||||
"location": {
|
|
||||||
"start": [
|
|
||||||
17,
|
|
||||||
4
|
|
||||||
],
|
|
||||||
"end": [
|
|
||||||
17,
|
|
||||||
13
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"message": "Unknown method __gt__ on Column[float]"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Warning",
|
|
||||||
"location": {
|
|
||||||
"start": [
|
|
||||||
18,
|
|
||||||
4
|
|
||||||
],
|
|
||||||
"end": [
|
|
||||||
18,
|
|
||||||
14
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"message": "Unknown method __le__ on Column[int]"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Warning",
|
|
||||||
"location": {
|
|
||||||
"start": [
|
|
||||||
18,
|
|
||||||
4
|
|
||||||
],
|
|
||||||
"end": [
|
|
||||||
18,
|
|
||||||
14
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"message": "Unknown method __le__ on Column[float]"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Warning",
|
|
||||||
"location": {
|
|
||||||
"start": [
|
|
||||||
19,
|
|
||||||
4
|
|
||||||
],
|
|
||||||
"end": [
|
|
||||||
19,
|
|
||||||
14
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"message": "Unknown method __ge__ on Column[int]"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Warning",
|
|
||||||
"location": {
|
|
||||||
"start": [
|
|
||||||
19,
|
|
||||||
4
|
|
||||||
],
|
|
||||||
"end": [
|
|
||||||
19,
|
|
||||||
14
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"message": "Unknown method __ge__ on Column[float]"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Warning",
|
|
||||||
"location": {
|
|
||||||
"start": [
|
|
||||||
20,
|
|
||||||
4
|
|
||||||
],
|
|
||||||
"end": [
|
|
||||||
20,
|
|
||||||
14
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"message": "Unknown method __eq__ on Column[int]"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Warning",
|
|
||||||
"location": {
|
|
||||||
"start": [
|
|
||||||
20,
|
|
||||||
4
|
|
||||||
],
|
|
||||||
"end": [
|
|
||||||
20,
|
|
||||||
14
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"message": "Unknown method __eq__ on Column[float]"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Warning",
|
|
||||||
"location": {
|
|
||||||
"start": [
|
|
||||||
21,
|
|
||||||
4
|
|
||||||
],
|
|
||||||
"end": [
|
|
||||||
21,
|
|
||||||
14
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"message": "Unknown method __eq__ on Column[int]"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Warning",
|
|
||||||
"location": {
|
|
||||||
"start": [
|
|
||||||
21,
|
|
||||||
4
|
|
||||||
],
|
|
||||||
"end": [
|
|
||||||
21,
|
|
||||||
14
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"message": "Unknown method __eq__ on Column[float]"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"judgments": [
|
"judgments": [
|
||||||
{
|
{
|
||||||
"location": {
|
"location": {
|
||||||
@@ -983,14 +814,18 @@
|
|||||||
"index": 0,
|
"index": 0,
|
||||||
"name": "a",
|
"name": "a",
|
||||||
"type": {
|
"type": {
|
||||||
"type": {}
|
"type": {
|
||||||
|
"name": "bool"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"index": 1,
|
"index": 1,
|
||||||
"name": "b",
|
"name": "b",
|
||||||
"type": {
|
"type": {
|
||||||
"type": {}
|
"type": {
|
||||||
|
"name": "bool"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -1083,14 +918,18 @@
|
|||||||
"index": 0,
|
"index": 0,
|
||||||
"name": "a",
|
"name": "a",
|
||||||
"type": {
|
"type": {
|
||||||
"type": {}
|
"type": {
|
||||||
|
"name": "bool"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"index": 1,
|
"index": 1,
|
||||||
"name": "b",
|
"name": "b",
|
||||||
"type": {
|
"type": {
|
||||||
"type": {}
|
"type": {
|
||||||
|
"name": "bool"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -1183,14 +1022,18 @@
|
|||||||
"index": 0,
|
"index": 0,
|
||||||
"name": "a",
|
"name": "a",
|
||||||
"type": {
|
"type": {
|
||||||
"type": {}
|
"type": {
|
||||||
|
"name": "bool"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"index": 1,
|
"index": 1,
|
||||||
"name": "b",
|
"name": "b",
|
||||||
"type": {
|
"type": {
|
||||||
"type": {}
|
"type": {
|
||||||
|
"name": "bool"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -1283,14 +1126,18 @@
|
|||||||
"index": 0,
|
"index": 0,
|
||||||
"name": "a",
|
"name": "a",
|
||||||
"type": {
|
"type": {
|
||||||
"type": {}
|
"type": {
|
||||||
|
"name": "bool"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"index": 1,
|
"index": 1,
|
||||||
"name": "b",
|
"name": "b",
|
||||||
"type": {
|
"type": {
|
||||||
"type": {}
|
"type": {
|
||||||
|
"name": "bool"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -1383,14 +1230,18 @@
|
|||||||
"index": 0,
|
"index": 0,
|
||||||
"name": "a",
|
"name": "a",
|
||||||
"type": {
|
"type": {
|
||||||
"type": {}
|
"type": {
|
||||||
|
"name": "bool"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"index": 1,
|
"index": 1,
|
||||||
"name": "b",
|
"name": "b",
|
||||||
"type": {
|
"type": {
|
||||||
"type": {}
|
"type": {
|
||||||
|
"name": "bool"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -1483,14 +1334,18 @@
|
|||||||
"index": 0,
|
"index": 0,
|
||||||
"name": "a",
|
"name": "a",
|
||||||
"type": {
|
"type": {
|
||||||
"type": {}
|
"type": {
|
||||||
|
"name": "bool"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"index": 1,
|
"index": 1,
|
||||||
"name": "b",
|
"name": "b",
|
||||||
"type": {
|
"type": {
|
||||||
"type": {}
|
"type": {
|
||||||
|
"name": "bool"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user