Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datetime Filtering | Broken Tests #331

Closed
borderBite opened this issue Jul 3, 2019 · 3 comments
Closed

Datetime Filtering | Broken Tests #331

borderBite opened this issue Jul 3, 2019 · 3 comments

Comments

@borderBite
Copy link

borderBite commented Jul 3, 2019

I can't figure out how to filter on datetime fields. I always get the error SyntaxError: invalid token. I could be missing something obvious, but I can't figure it out.

I looked in the tests for the proper syntax, but I get the same error when running the relevant test assertions.

Example:

x = np.array(['2019-01-04T21:23:00', '2019-02-04T05:00:10', '2019-03-04T15:15:15', '2019-06-21T10:31:15'], dtype=np.datetime64)
df = vaex.from_arrays(x=x)
df.x < np.datetime64('2019-03-15')

Failing tests:
https://github.com/vaexio/vaex/blob/e8bd66575ac753f5d3c539eb3c6177643bfeeca6/tests/datetime_test.py
test_datetime_binary_operations()
test_timedelta_arithmetics()

pip freeze output:

aplus==0.11.0
astropy==3.2.1
boto3==1.9.183
botocore==1.12.183
cachetools==3.1.1
certifi==2019.6.16
chardet==3.0.4
Click==7.0
cloudpickle==1.2.1
cycler==0.10.0
docutils==0.14
fastapi==0.31.0
future==0.17.1
futures==3.1.1
h11==0.8.1
h5py==2.9.0
httptools==0.0.13
idna==2.8
jmespath==0.9.4
kiwisolver==1.1.0
matplotlib==3.1.1
numpy==1.16.4
pandas==0.24.2
Pillow==6.1.0
progressbar2==3.42.0
psutil==5.6.3
pyarrow==0.13.0
pydantic==0.29
pyparsing==2.4.0
python-dateutil==2.8.0
python-utils==2.3.0
pytz==2019.1
PyYAML==5.1.1
requests==2.22.0
s3fs==0.2.2
s3transfer==0.2.1
scipy==1.3.0
six==1.12.0
starlette==0.12.0
tabulate==0.8.3
tornado==6.0.3
urllib3==1.25.3
uvicorn==0.8.3
uvloop==0.12.2
vaex-arrow==0.3.2
vaex-core==0.8.1
websockets==7.0
@JovanVeljanoski
Copy link
Member

Hi Nick,

Can you please tell me which version of vaex you are using? Also, how did you install it, through the pip package or from source?

I can not reproduce your issue in the latest version of master, and in any case we are planning to make a new release in the next few days.

Cheers.

@maartenbreddels
Copy link
Member

Hi Nick,

thanks for the report, as Jovan was saying, this should work in master, and is expected to fail for the latest release. Hope to do a new release today.

cheers,

Maarten

Jovan: it is slightly annoying we cannot see from the version number that we have the latest release or the dev/source/master install, we should change that.

@JovanVeljanoski
Copy link
Member

Jovan: it is slightly annoying we cannot see from the version number that we have the latest release or the dev/source/master install, we should change that.

Fully agree. I was actually thinking the same thing when I looked at this yesterday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants