Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
25e42c8
update dependencies
emgeee Sep 9, 2024
9cea1fb
update get_logical_plan signature
emgeee Sep 9, 2024
6fca28b
remove row_number() function
emgeee Sep 9, 2024
f2b3d3b
remove unneeded dependency
emgeee Sep 9, 2024
4b45a4b
fix pyo3 warnings
emgeee Sep 10, 2024
6353aa9
update object_store dependency
emgeee Sep 10, 2024
815b6d7
change PyExpr -> PySortExpr
emgeee Sep 10, 2024
92806a8
comment out key.extract::<&PyTuple>() condition statement
emgeee Sep 10, 2024
e2fa24e
change more instances of PyExpr > PySortExpr
emgeee Sep 10, 2024
21013a7
update function signatures to use _bound versions
emgeee Sep 10, 2024
142e4ed
remove clone
emgeee Sep 10, 2024
e971add
Working through some of the sort requirement changes
timsaucer Sep 10, 2024
c89357e
remove unused import
emgeee Sep 10, 2024
8255f09
expr.display_name is deprecated, used format!() + schema_name() instead
emgeee Sep 10, 2024
df46054
expr.canonical_name() is deprecated, use format!() expr instead
emgeee Sep 10, 2024
6c27614
remove comment
emgeee Sep 10, 2024
70546e2
fix tuple extraction in dataframe.__getitem__()
emgeee Sep 10, 2024
836061f
remove unneeded import
emgeee Sep 10, 2024
4945661
Add docstring comments to SortExpr python class
emgeee Sep 10, 2024
cd04c44
change extract() to downcast()
emgeee Sep 10, 2024
afcc9f1
deprecate Expr::display_name
Michael-J-Ward Aug 10, 2024
7f6187a
fix lint errors
emgeee Sep 10, 2024
8aebaea
update datafusion commit hash
emgeee Sep 11, 2024
afa303f
fix type in cargo file for arrow features
emgeee Sep 17, 2024
f4574ec
upgrade to datafusion 42
emgeee Sep 17, 2024
88ccbd8
cleanup
emgeee Sep 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix lint errors
  • Loading branch information
emgeee committed Sep 10, 2024
commit 7f6187ac2641ffdef31acb7a1cc625327fa4d1a4
18 changes: 10 additions & 8 deletions python/datafusion/expr.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@

from __future__ import annotations

from ._internal import (
expr as expr_internal,
LogicalPlan,
functions as functions_internal,
)
from datafusion.common import NullTreatment, RexType, DataTypeMap
from typing import Any, Optional, Type
from typing_extensions import deprecated

import pyarrow as pa
from datafusion.common import DataTypeMap, NullTreatment, RexType
from typing_extensions import deprecated

from ._internal import LogicalPlan
from ._internal import expr as expr_internal
from ._internal import functions as functions_internal

# The following are imported from the internal representation. We may choose to
# give these all proper wrappers, or to simply leave as is. These were added
Expand Down Expand Up @@ -196,7 +196,9 @@ def to_variant(self) -> Any:
"""Convert this expression into a python object if possible."""
return self.expr.to_variant()

@deprecated("display_name() is deprecated. Use :py:meth:`~Expr.schema_name` instead")
@deprecated(
"display_name() is deprecated. Use :py:meth:`~Expr.schema_name` instead"
)
def display_name(self) -> str:
"""Returns the name of this expression as it should appear in a schema.

Expand Down
14 changes: 9 additions & 5 deletions python/datafusion/tests/test_expr.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,21 @@
# specific language governing permissions and limitations
# under the License.

import pyarrow
import pytest
from datafusion import SessionContext, col
from datafusion.expr import Column, Literal, BinaryExpr, AggregateFunction
from datafusion.expr import (
Projection,
Filter,
Aggregate,
AggregateFunction,
BinaryExpr,
Column,
Filter,
Limit,
Literal,
Projection,
Sort,
TableScan,
)
import pyarrow
import pytest


@pytest.fixture
Expand Down Expand Up @@ -196,6 +199,7 @@ def test_expr_getitem() -> None:

def test_display_name_deprecation():
import warnings

expr = col("foo")
with warnings.catch_warnings(record=True) as w:
# Cause all warnings to always be triggered
Expand Down