Skip to content

Commit cdbb9a4

Browse files
committed
feat(oracle): implement mode aggregation
1 parent 5fbf8c5 commit cdbb9a4

File tree

3 files changed

+4
-12
lines changed

3 files changed

+4
-12
lines changed

ibis/backends/sql/compilers/oracle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ class OracleCompiler(SQLGlotCompiler):
5757
ops.ArrayFlatten,
5858
ops.ArrayMap,
5959
ops.ArrayStringJoin,
60-
ops.Mode,
6160
ops.MultiQuantile,
6261
ops.RegexSplit,
6362
ops.StringSplit,
@@ -89,6 +88,7 @@ class OracleCompiler(SQLGlotCompiler):
8988
ops.RPad: "rpad",
9089
ops.StringAscii: "ascii",
9190
ops.Strip: "trim",
91+
ops.Mode: "stats_mode",
9292
}
9393

9494
@staticmethod

ibis/backends/tests/test_aggregation.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ def mean_udf(s):
9393
"pyspark",
9494
"trino",
9595
"druid",
96-
"oracle",
9796
"flink",
9897
"risingwave",
9998
"exasol",
@@ -391,7 +390,6 @@ def mean_and_std(v):
391390
"mssql",
392391
"trino",
393392
"druid",
394-
"oracle",
395393
"exasol",
396394
"flink",
397395
"risingwave",

ibis/backends/tests/test_generic.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -906,20 +906,14 @@ def test_table_info_large(con):
906906
],
907907
marks=[
908908
pytest.mark.notimpl(
909-
[
910-
"clickhouse",
911-
"exasol",
912-
"impala",
913-
"pyspark",
914-
"risingwave",
915-
],
909+
["clickhouse", "exasol", "impala", "pyspark", "risingwave"],
916910
raises=com.OperationNotDefinedError,
917911
reason="mode is not supported",
918912
),
919913
pytest.mark.notimpl(
920914
["oracle"],
921-
raises=com.OperationNotDefinedError,
922-
reason="Mode is not supported and ORA-02000: missing AS keyword",
915+
raises=OracleDatabaseError,
916+
reason="ORA-02000: missing AS keyword",
923917
),
924918
pytest.mark.notimpl(
925919
["dask"],

0 commit comments

Comments
 (0)