Skip to content

Commit 26ab9b8

Browse files
alxmrsclaude
andcommitted
Address review: explain the default config in a comment, not the docstring
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NyN7idACeDMh94qrnFMu6h
1 parent aa8097f commit 26ab9b8

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

‎xarray_sql/sql.py‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,18 @@
2929
class Context(SessionContext):
3030
"""A datafusion `SessionContext` that also supports `xarray.Dataset`s.
3131
32-
Without a `config`, a context splits a query's work across partitions
33-
only where enough rows reach it, by DataFusion's estimate. DataFusion
34-
otherwise splits every input whose row count is an estimate, as it is
35-
after a join, a filter or an aggregate, however few rows that is.
36-
Splitting small inputs makes a query of a few thousand rows two to
37-
three times slower to run. A `config` given is used as it is.
38-
3932
Also available under its original name, ``XarrayContext``.
4033
"""
4134

4235
def __init__(self, config: SessionConfig | None = None, *args, **kwargs):
4336
if config is None:
37+
# Split a query's work across partitions only where enough rows
38+
# reach it, by DataFusion's estimate. DataFusion otherwise splits
39+
# every input whose row count is an estimate, as it is after a
40+
# join, a filter or an aggregate, however few rows that is, which
41+
# makes a query of a few thousand rows two to three times slower
42+
# to run. A config given is used as it is.
43+
#
4444
# A bare SessionConfig turns off the information schema, which
4545
# SessionContext() turns on; otherwise the two are the same.
4646
config = (

0 commit comments

Comments
 (0)