This is an automated email from the ASF dual-hosted git repository.
agrove pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion-python.git
The following commit(s) were added to refs/heads/main by this push:
new a0913c7 chore: fix docstrings, typos (#852)
a0913c7 is described below
commit a0913c728f5f323c1eb4913e614c9d996083e274
Author: Daniel Mesejo <[email protected]>
AuthorDate: Fri Sep 6 17:30:04 2024 +0200
chore: fix docstrings, typos (#852)
---
python/datafusion/context.py | 12 +++++++-----
python/datafusion/expr.py | 2 +-
python/datafusion/functions.py | 5 -----
3 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/python/datafusion/context.py b/python/datafusion/context.py
index f6bf1c6..903d4a1 100644
--- a/python/datafusion/context.py
+++ b/python/datafusion/context.py
@@ -73,7 +73,7 @@ class SessionConfig:
def with_default_catalog_and_schema(
self, catalog: str, schema: str
) -> SessionConfig:
- """Select a name for the default catalog and shcema.
+ """Select a name for the default catalog and schema.
Args:
catalog: Catalog name.
@@ -517,7 +517,7 @@ class SessionContext:
def sql_with_options(self, query: str, options: SQLOptions) -> DataFrame:
"""Create a :py:class:`~datafusion.dataframe.DataFrame` from SQL query
text.
- This function will first validating that the query is allowed by the
+ This function will first validate that the query is allowed by the
provided options.
Args:
@@ -636,12 +636,14 @@ class SessionContext:
"""
return DataFrame(self.ctx.from_polars(data, name))
- def register_table(self, name: str, table: pyarrow.Table) -> None:
- """Register a table with the given name into the session.
+ def register_table(self, name: str, table: Table) -> None:
+ """Register a :py:class: `~datafusion.catalog.Table` as a table.
+
+ The registered table can be referenced from SQL statement executed
against.
Args:
name: Name of the resultant table.
- table: PyArrow table to add to the session context.
+ table: DataFusion table to add to the session context.
"""
self.ctx.register_table(name, table)
diff --git a/python/datafusion/expr.py b/python/datafusion/expr.py
index a58634b..7fa6080 100644
--- a/python/datafusion/expr.py
+++ b/python/datafusion/expr.py
@@ -266,7 +266,7 @@ class Expr:
If ``key`` is a string, returns the subfield of the struct.
If ``key`` is an integer, retrieves the element in the array. Note
that the
- element index begins at ``0``, unlike `array_element` which begines at
``1``.
+ element index begins at ``0``, unlike `array_element` which begins at
``1``.
"""
if isinstance(key, int):
return Expr(
diff --git a/python/datafusion/functions.py b/python/datafusion/functions.py
index 4c701b2..97b4fe1 100644
--- a/python/datafusion/functions.py
+++ b/python/datafusion/functions.py
@@ -18,11 +18,6 @@
from __future__ import annotations
-# from datafusion._internal.context import SessionContext
-# from datafusion._internal.expr import Expr
-# from datafusion._internal.expr.conditional_expr import CaseBuilder
-# from datafusion._internal.expr.window import WindowFrame
-
from datafusion._internal import functions as f, common
from datafusion.expr import CaseBuilder, Expr, WindowFrame
from datafusion.context import SessionContext
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]