some new features

This commit is contained in:
ilgazca
2025-07-30 17:09:11 +03:00
parent db5d46760a
commit 8019bd3b7c
20616 changed files with 4375466 additions and 8 deletions

View File

@ -0,0 +1,30 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Protocol
from narwhals._compliant.dataframe import CompliantLazyFrame
from narwhals._compliant.typing import CompliantExprT_contra, NativeExprT, NativeFrameT
from narwhals._translate import ToNarwhalsT_co
if TYPE_CHECKING:
from typing_extensions import Self, TypeAlias
from narwhals._compliant.window import WindowInputs
from narwhals._sql.expr import SQLExpr
Incomplete: TypeAlias = Any
class SQLLazyFrame(
CompliantLazyFrame[CompliantExprT_contra, NativeFrameT, ToNarwhalsT_co],
Protocol[CompliantExprT_contra, NativeFrameT, ToNarwhalsT_co],
):
def _evaluate_window_expr(
self,
expr: SQLExpr[Self, NativeExprT],
/,
window_inputs: WindowInputs[NativeExprT],
) -> NativeExprT:
result = expr.window_function(self, window_inputs)
assert len(result) == 1 # debug assertion # noqa: S101
return result[0]