Skip to content

Commit c53ce33

Browse files
authored
docs(support-matrix): hide internal operations from the support matrix (#10352)
1 parent 0d95336 commit c53ce33

File tree

6 files changed

+40
-20
lines changed

6 files changed

+40
-20
lines changed

docs/backends/support/matrix.qmd

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ dict(value=sql_backends, color="green", icon="database")
6363

6464
```{python}
6565
#| echo: false
66+
import inspect
67+
6668
import pandas as pd
6769
6870
import ibis
@@ -72,11 +74,30 @@ import ibis.expr.operations as ops
7274
def make_support_matrix():
7375
"""Construct the backend operation support matrix data."""
7476
75-
from ibis.backends.sql.compilers.base import ALL_OPERATIONS
76-
77-
support_matrix_ignored_operations = (ops.ScalarParameter,)
77+
# these are handled either through rewrites or by visit methods on their
78+
# subclasses
79+
support_matrix_ignored_operations = (
80+
ops.Alias,
81+
ops.AnalyticVectorizedUDF,
82+
ops.Distinct,
83+
ops.DropNull,
84+
ops.ElementWiseVectorizedUDF,
85+
ops.FillNull,
86+
ops.ReductionVectorizedUDF,
87+
ops.ScalarParameter,
88+
ops.Subquery,
89+
)
7890
79-
public_ops = ALL_OPERATIONS.difference(support_matrix_ignored_operations)
91+
public_ops = {
92+
op
93+
for _, mod in inspect.getmembers(ops, inspect.ismodule)
94+
for _, op in inspect.getmembers(
95+
mod, lambda cls: inspect.isclass(cls)
96+
and issubclass(cls, ops.Node)
97+
and cls.__name__ in mod.__all__
98+
and not cls.__subclasses__()
99+
)
100+
}.difference(support_matrix_ignored_operations)
80101
81102
assert public_ops
82103

ibis/backends/sql/compilers/flink.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ class FlinkCompiler(SQLGlotCompiler):
7575
ops.CountDistinctStar,
7676
ops.Covariance,
7777
ops.DateDiff,
78-
ops.ExtractURLField,
7978
ops.FindInSet,
8079
ops.IsInf,
8180
ops.IsNan,

ibis/expr/operations/analytic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ class RankBase(Analytic):
4848

4949
@public
5050
class MinRank(RankBase):
51-
pass
51+
"""Rank within an ordered partition."""
5252

5353

5454
@public
5555
class DenseRank(RankBase):
56-
pass
56+
"""Rank within an ordered partition, consecutively."""
5757

5858

5959
@public

ibis/expr/operations/arrays.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ class TimestampRange(Range):
272272
step: Value[dt.Interval]
273273

274274

275+
@public
275276
class ArrayAgg(Value):
276277
arg: Value[dt.Array]
277278
shape = rlz.shape_like("args")

ibis/expr/operations/relations.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ def schema(self):
147147

148148
@public
149149
class DropColumns(Relation):
150+
"""Drop columns from a relation."""
151+
150152
parent: Relation
151153
columns_to_drop: frozenset[str]
152154

@@ -184,6 +186,8 @@ def schema(self):
184186
# TODO(kszucs): remove in favor of View
185187
@public
186188
class SelfReference(Reference):
189+
"""A self-referential relation."""
190+
187191
values = FrozenOrderedDict()
188192

189193

ibis/expr/operations/strings.py

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -313,49 +313,44 @@ class StringConcat(Value):
313313

314314

315315
@public
316-
class ExtractURLField(StringUnary):
317-
pass
318-
319-
320-
@public
321-
class ExtractProtocol(ExtractURLField):
316+
class ExtractProtocol(StringUnary):
322317
"""Extract the protocol from a URL."""
323318

324319

325320
@public
326-
class ExtractAuthority(ExtractURLField):
321+
class ExtractAuthority(StringUnary):
327322
"""Extract the authority from a URL."""
328323

329324

330325
@public
331-
class ExtractUserInfo(ExtractURLField):
326+
class ExtractUserInfo(StringUnary):
332327
"""Extract the user info from a URL."""
333328

334329

335330
@public
336-
class ExtractHost(ExtractURLField):
331+
class ExtractHost(StringUnary):
337332
"""Extract the host from a URL."""
338333

339334

340335
@public
341-
class ExtractFile(ExtractURLField):
336+
class ExtractFile(StringUnary):
342337
"""Extract the file from a URL."""
343338

344339

345340
@public
346-
class ExtractPath(ExtractURLField):
341+
class ExtractPath(StringUnary):
347342
"""Extract the path from a URL."""
348343

349344

350345
@public
351-
class ExtractQuery(ExtractURLField):
346+
class ExtractQuery(StringUnary):
352347
"""Extract the query from a URL."""
353348

354349
key: Optional[Value[dt.String]] = None
355350

356351

357352
@public
358-
class ExtractFragment(ExtractURLField):
353+
class ExtractFragment(StringUnary):
359354
"""Extract the fragment from a URL."""
360355

361356

0 commit comments

Comments
 (0)