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

MLDBFB-441 distinct_timestamps bad ts value kept test case #290

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

FinchPowers
Copy link
Member

No description provided.

@FinchPowers
Copy link
Member Author

On hold. I could fix test_MLDB_1509 instead.

"columns": [
["distinct_timestamps(colA).0",
{"ts":"1970-01-01T00:00:00Z"},
"1970-01-01T00:00:00Z"], # <--- MLDB returns the 5th second
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is expected. We return the list of known distinct timestamps at the latest timestamp.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is expected. The result of the distinct_timestamps() function is an embedding (an array) of timestamps (those are the values) and the timestamps of the timestamps are all set to the latest timestamp.

timestamp timestamp timestamp

@@ -604,21 +613,21 @@ def test_MLDB_1509(self):
{
"ts": "2015-01-01T00:00:00Z"
},
"2015-01-03T00:00:00Z"
"2015-01-01T00:00:00Z"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise we lose the power of the "WHEN" operator.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you elaborate?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edit: We lose the some of the power of the "WHEN" operator in the particular use case that interrests me.

With the current implementation, that cell/value is kept with a WHEN value_timestamp() > to_timestamp('2015-01-02T00:00:00Z'). I want it to be discarded.

I'm investigating alternatives. I can probably push the distinct_timestamps usage later in the pipeline at the cost of performance.

@FinchPowers
Copy link
Member Author

@nicolaskruchten Good to go now.

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

Successfully merging this pull request may close these issues.

3 participants