File tree 2 files changed +19
-13
lines changed
2 files changed +19
-13
lines changed Original file line number Diff line number Diff line change 22
22
23
23
from __future__ import annotations
24
24
25
- from ._internal import (
26
- expr as expr_internal ,
27
- LogicalPlan ,
28
- functions as functions_internal ,
29
- )
30
- from datafusion .common import NullTreatment , RexType , DataTypeMap
31
25
from typing import Any , Optional , Type
32
- from typing_extensions import deprecated
26
+
33
27
import pyarrow as pa
28
+ from datafusion .common import DataTypeMap , NullTreatment , RexType
29
+ from typing_extensions import deprecated
30
+
31
+ from ._internal import LogicalPlan
32
+ from ._internal import expr as expr_internal
33
+ from ._internal import functions as functions_internal
34
34
35
35
# The following are imported from the internal representation. We may choose to
36
36
# give these all proper wrappers, or to simply leave as is. These were added
@@ -196,7 +196,9 @@ def to_variant(self) -> Any:
196
196
"""Convert this expression into a python object if possible."""
197
197
return self .expr .to_variant ()
198
198
199
- @deprecated ("display_name() is deprecated. Use :py:meth:`~Expr.schema_name` instead" )
199
+ @deprecated (
200
+ "display_name() is deprecated. Use :py:meth:`~Expr.schema_name` instead"
201
+ )
200
202
def display_name (self ) -> str :
201
203
"""Returns the name of this expression as it should appear in a schema.
202
204
Original file line number Diff line number Diff line change 15
15
# specific language governing permissions and limitations
16
16
# under the License.
17
17
18
+ import pyarrow
19
+ import pytest
18
20
from datafusion import SessionContext , col
19
- from datafusion .expr import Column , Literal , BinaryExpr , AggregateFunction
20
21
from datafusion .expr import (
21
- Projection ,
22
- Filter ,
23
22
Aggregate ,
23
+ AggregateFunction ,
24
+ BinaryExpr ,
25
+ Column ,
26
+ Filter ,
24
27
Limit ,
28
+ Literal ,
29
+ Projection ,
25
30
Sort ,
26
31
TableScan ,
27
32
)
28
- import pyarrow
29
- import pytest
30
33
31
34
32
35
@pytest .fixture
@@ -196,6 +199,7 @@ def test_expr_getitem() -> None:
196
199
197
200
def test_display_name_deprecation ():
198
201
import warnings
202
+
199
203
expr = col ("foo" )
200
204
with warnings .catch_warnings (record = True ) as w :
201
205
# Cause all warnings to always be triggered
You can’t perform that action at this time.
0 commit comments