blob: 013bb9db75d1a36b109e87c42fd294d0ea2b9730 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
from __future__ import annotations
from typing import TYPE_CHECKING
from narwhals._compliant import CompliantSelector, LazySelectorNamespace
from narwhals._spark_like.expr import SparkLikeExpr
if TYPE_CHECKING:
from sqlframe.base.column import Column # noqa: F401
from narwhals._spark_like.dataframe import SparkLikeLazyFrame # noqa: F401
class SparkLikeSelectorNamespace(LazySelectorNamespace["SparkLikeLazyFrame", "Column"]):
@property
def _selector(self) -> type[SparkLikeSelector]:
return SparkLikeSelector
class SparkLikeSelector(CompliantSelector["SparkLikeLazyFrame", "Column"], SparkLikeExpr): # type: ignore[misc]
def _to_expr(self) -> SparkLikeExpr:
return SparkLikeExpr(
self._call,
evaluate_output_names=self._evaluate_output_names,
alias_output_names=self._alias_output_names,
backend_version=self._backend_version,
version=self._version,
implementation=self._implementation,
)
|