fix(checker): correct return type for column aggregation
Tests / tests (pull_request) Successful in 10s
Tests / tests (pull_request) Successful in 10s
This commit is contained in:
@@ -13,7 +13,6 @@ from midas.checker.types import (
|
||||
Function,
|
||||
ParamSpec,
|
||||
Type,
|
||||
UnknownType,
|
||||
)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
@@ -97,11 +96,9 @@ class ColumnGroupByMethodRegistry(MethodRegistry[Call]):
|
||||
positional=[],
|
||||
keywords={},
|
||||
)
|
||||
if not isinstance(returns, ColumnType):
|
||||
returns = ColumnType(type=UnknownType())
|
||||
signature = Function(
|
||||
params=ParamSpec(mixed=real_params),
|
||||
returns=returns,
|
||||
returns=ColumnType(type=returns),
|
||||
)
|
||||
|
||||
result: CallResult = self.dispatcher.get_result(
|
||||
|
||||
@@ -364,14 +364,12 @@ class ColumnMethodRegistry(MethodRegistry[Call]):
|
||||
Type: the result type
|
||||
"""
|
||||
|
||||
returns: Type = ColumnType(type=TopType())
|
||||
returns: Type = TopType()
|
||||
if formula:
|
||||
returns = ColumnType(
|
||||
type=self._resolve_formula_type(
|
||||
returns = self._resolve_formula_type(
|
||||
call,
|
||||
formula(call.column.type),
|
||||
)
|
||||
)
|
||||
signature = Function(
|
||||
params=ParamSpec(
|
||||
kw=[
|
||||
|
||||
@@ -4305,9 +4305,7 @@
|
||||
"arguments": [],
|
||||
"keywords": {}
|
||||
},
|
||||
"type": {
|
||||
"type": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
@@ -4342,9 +4340,7 @@
|
||||
"arguments": [],
|
||||
"keywords": {}
|
||||
},
|
||||
"type": {
|
||||
"type": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
@@ -4379,11 +4375,9 @@
|
||||
"arguments": [],
|
||||
"keywords": {}
|
||||
},
|
||||
"type": {
|
||||
"type": {
|
||||
"name": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
@@ -4418,11 +4412,9 @@
|
||||
"arguments": [],
|
||||
"keywords": {}
|
||||
},
|
||||
"type": {
|
||||
"type": {
|
||||
"name": "float"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
@@ -4457,11 +4449,9 @@
|
||||
"arguments": [],
|
||||
"keywords": {}
|
||||
},
|
||||
"type": {
|
||||
"type": {
|
||||
"name": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
@@ -4496,11 +4486,9 @@
|
||||
"arguments": [],
|
||||
"keywords": {}
|
||||
},
|
||||
"type": {
|
||||
"type": {
|
||||
"name": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
@@ -4535,11 +4523,9 @@
|
||||
"arguments": [],
|
||||
"keywords": {}
|
||||
},
|
||||
"type": {
|
||||
"type": {
|
||||
"name": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
@@ -4574,11 +4560,9 @@
|
||||
"arguments": [],
|
||||
"keywords": {}
|
||||
},
|
||||
"type": {
|
||||
"type": {
|
||||
"name": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
@@ -4613,11 +4597,9 @@
|
||||
"arguments": [],
|
||||
"keywords": {}
|
||||
},
|
||||
"type": {
|
||||
"type": {
|
||||
"name": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
@@ -4652,9 +4634,7 @@
|
||||
"arguments": [],
|
||||
"keywords": {}
|
||||
},
|
||||
"type": {
|
||||
"type": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
@@ -4689,11 +4669,9 @@
|
||||
"arguments": [],
|
||||
"keywords": {}
|
||||
},
|
||||
"type": {
|
||||
"type": {
|
||||
"name": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
@@ -4728,9 +4706,7 @@
|
||||
"arguments": [],
|
||||
"keywords": {}
|
||||
},
|
||||
"type": {
|
||||
"type": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
|
||||
Reference in New Issue
Block a user