Skip to content

Commit

Permalink
fix(mssql): remove invalid aggregations
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysztof-kwitt authored and cpcloud committed Mar 16, 2023
1 parent 3dffff7 commit 1ce3ef9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 24 deletions.
5 changes: 5 additions & 0 deletions ibis/backends/mssql/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,11 @@ def _timestamp_truncate(t, op):
# ibis.expr.operations.strings
ops.RPad,
ops.LPad,
# ibis.expr.operations.reductions
ops.BitAnd,
ops.BitOr,
ops.BitXor,
ops.GroupConcat,
}

operation_registry = {
Expand Down
28 changes: 4 additions & 24 deletions ibis/backends/tests/test_aggregation.py
Original file line number Diff line number Diff line change
Expand Up @@ -695,14 +695,9 @@ def mean_and_std(v):
id='bit_and',
marks=[
pytest.mark.notimpl(
["polars", "datafusion"],
["polars", "datafusion", "mssql"],
raises=com.OperationNotDefinedError,
),
pytest.mark.notimpl(
["mssql"],
raises=sa.exc.OperationalError,
reason="'bit_and' is not a recognized built-in function name.",
),
pytest.mark.notimpl(["druid"], strict=False, raises=AssertionError),
pytest.mark.notyet(
["impala", "pyspark"], raises=com.OperationNotDefinedError
Expand All @@ -720,14 +715,9 @@ def mean_and_std(v):
id='bit_or',
marks=[
pytest.mark.notimpl(
["polars", "datafusion"],
["polars", "datafusion", "mssql"],
raises=com.OperationNotDefinedError,
),
pytest.mark.notimpl(
["mssql"],
raises=sa.exc.OperationalError,
reason="'bit_or' is not a recognized built-in function name.",
),
pytest.mark.notyet(
["impala", "pyspark"], raises=com.OperationNotDefinedError
),
Expand All @@ -744,14 +734,9 @@ def mean_and_std(v):
id='bit_xor',
marks=[
pytest.mark.notimpl(
["polars", "datafusion"],
["polars", "datafusion", "mssql"],
raises=com.OperationNotDefinedError,
),
pytest.mark.notimpl(
["mssql"],
raises=sa.exc.OperationalError,
reason="'bit_xor' is not a recognized built-in function name.",
),
pytest.mark.notyet(
["impala", "pyspark"], raises=com.OperationNotDefinedError
),
Expand Down Expand Up @@ -1206,19 +1191,14 @@ def test_approx_median(alltypes):
],
)
@mark.notimpl(
["datafusion", "polars"],
["datafusion", "polars", "mssql"],
raises=com.OperationNotDefinedError,
)
@mark.notimpl(
["druid"],
raises=sa.exc.ProgrammingError,
reason="No match found for function signature group_concat(<CHARACTER>, <CHARACTER>)",
)
@mark.notimpl(
["mssql"],
raises=sa.exc.OperationalError,
reason="'group_concat' is not a recognized built-in function name",
)
def test_group_concat(
backend,
alltypes,
Expand Down

0 comments on commit 1ce3ef9

Please sign in to comment.