From f0c7df2b8986329420c5abe9e015501fc3df9db9 Mon Sep 17 00:00:00 2001 From: Chang She Date: Sun, 23 Jul 2023 12:34:31 +0200 Subject: [PATCH] fix bug in pandas check --- .github/workflows/benchmarks.yml | 6 +++--- python/python/lance/util.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 5b0cda4a0a..fe279b0f83 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -1,8 +1,7 @@ name: Run benchmarks on: - push: - branches: ["main"] + workflow_dispatch: jobs: dataset: @@ -26,7 +25,8 @@ jobs: - name: Pip install working-directory: python run: | - python -m pip install $(ls target/wheels/*.whl) + pip install $(ls target/wheels/*.whl) + pip install pandas - name: Run test working-directory: benchmarks/${{ matrix.dataset }} run: | diff --git a/python/python/lance/util.py b/python/python/lance/util.py index 33ff09bb95..5bf19522d6 100644 --- a/python/python/lance/util.py +++ b/python/python/lance/util.py @@ -18,10 +18,10 @@ try: import pandas as pd - ts_types = Union[datetime, str] + ts_types = Union[datetime, pd.Timestamp, str] except ImportError: pd = None - ts_types = Union[datetime, pd.Timestamp, str] + ts_types = Union[datetime, str] def sanitize_ts(ts: ts_types) -> datetime: