File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44exposed as part of the public API. Keep the implementation minimal and
55documented so reviewers can easily see it's test-only.
66"""
7+
78from __future__ import annotations
89
9- from typing import Any
10+ from typing import TYPE_CHECKING
1011
1112from .context import SessionContext
1213
14+ if TYPE_CHECKING :
15+ from datafusion import DataFrame
16+
1317
1418def range_table (
1519 ctx : SessionContext ,
1620 start : int ,
1721 stop : int | None = None ,
1822 step : int = 1 ,
1923 partitions : int | None = None ,
20- ) -> Any :
24+ ) -> DataFrame :
2125 """Create a DataFrame containing a sequence of numbers using SQL RANGE.
2226
2327 This mirrors the previous ``SessionContext.range`` convenience method but
@@ -38,5 +42,5 @@ def range_table(
3842 start , stop = 0 , start
3943
4044 parts = f", { int (partitions )} " if partitions is not None else ""
41- sql = f"SELECT * FROM range({ int (start )} , { int (stop )} , { int (step )} { parts } )"
45+ sql = f"SELECT * FROM range({ int (start )} , { int (stop )} , { int (step )} { parts } )" # noqa: S608
4246 return ctx .sql (sql )
You can’t perform that action at this time.
0 commit comments