We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I noticed this while writing a unit test.
const someDataset = plywood.Dataset.fromJS([ { cut: 'Good', price: 400, time: new Date('2015-10-01T00:00:00Z') }, ]); const ex = $('data').filter($('time').is(new Date('2015-10-01T00:00:00Z'))).count(); const r = await ex.compute({ data: someDataset }); console.log(r); // --> 0
I tried sharing the date object between the query and the dataset but it's the same.
const d = new Date('2015-10-01T00:00:00Z'); const someDataset = plywood.Dataset.fromJS([ { cut: 'Good', price: 400, time: d }, ]); const ex = $('data').filter($('time').is(d)).count(); const r = await ex.compute({ data: someDataset }); console.log(r); // --> 0
I get the same with equals(new Date(...)) or in([new Date(...)]). But in() works if you share the Date object!
equals(new Date(...))
in([new Date(...)])
in()
const d = new Date('2015-10-01T00:00:00Z'); const someDataset = plywood.Dataset.fromJS([ { cut: 'Good', price: 400, time: d }, ]); const ex = $('data').filter($('time').in([d])).count(); const r = await ex.compute({ data: someDataset }); console.log(r); // --> 1
I think these all work with a Druid backend. I'm not sure what's the right way to do this in unit tests. Thanks for any advice!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I noticed this while writing a unit test.
I tried sharing the date object between the query and the dataset but it's the same.
I get the same with
equals(new Date(...))
orin([new Date(...)])
. Butin()
works if you share the Date object!I think these all work with a Druid backend. I'm not sure what's the right way to do this in unit tests. Thanks for any advice!
The text was updated successfully, but these errors were encountered: