Skip to content

Commit

Permalink
revert unnecessary changes
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoGorelli committed Feb 18, 2025
1 parent f88773d commit 21c7372
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 23 deletions.
15 changes: 0 additions & 15 deletions tests/expr_and_series/concat_str_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,21 +64,6 @@ def test_concat_str(
.select("a")
)
assert_equal_data(result, {"a": expected})
result = (
df.select(
nw.col("a").alias("a_original"),
nw.concat_str(
nw.nth(0) * 2,
nw.col("b"),
nw.col("c"),
separator=" ",
ignore_nulls=ignore_nulls, # default behavior is False
),
)
.sort("a_original")
.select("a")
)
assert_equal_data(result, {"a": expected})


def test_concat_str_with_lit(constructor: Constructor) -> None:
Expand Down
9 changes: 1 addition & 8 deletions tests/tpch_q1_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

if TYPE_CHECKING:
from narwhals.stable.v1.typing import IntoFrame
from narwhals.typing import Frame


@pytest.mark.parametrize(
Expand All @@ -44,16 +43,10 @@ def test_q1(library: str, request: pytest.FixtureRequest) -> None:
else:
df_raw = pa_csv.read_csv("tests/data/lineitem.csv")
var_1 = datetime(1998, 9, 2)
df: Frame = nw.from_native(df_raw).lazy()
df = nw.from_native(df_raw).lazy()
schema = df.collect_schema()
if schema["l_shipdate"] != nw.Date and schema["l_shipdate"] != nw.Datetime:
df = df.with_columns(nw.col("l_shipdate").str.to_datetime())
if df.implementation.is_dask():
# Avoid issues related to https://github.com/pandas-dev/pandas/issues/60937.
native = df.to_native()
native["l_shipdate"] = native["l_shipdate"].astype("timestamp[ns][pyarrow]") # type: ignore[index, union-attr]
df = nw.from_native(native)

query_result = (
df.filter(nw.col("l_shipdate") <= var_1)
.with_columns(
Expand Down

0 comments on commit 21c7372

Please sign in to comment.