Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ SELECT
SUM("added") AS "added",
SUM("deleted") AS "deleted",
SUM("delta") AS "delta",
EARLIEST("user", 128) AS "first_user",
LATEST("user", 128) AS "last_user"
-- Disabled due to https://github.com/apache/druid/issues/13824. To be reverted once issue is resolved.
-- EARLIEST("user", 128) AS "first_user",
-- LATEST("user", 128) AS "last_user"
EARLIEST_BY("user", CASE WHEN CAST("timestamp" AS BIGINT) > 0 THEN MILLIS_TO_TIMESTAMP(CAST("timestamp" AS BIGINT)) ELSE TIME_PARSE("timestamp") END, 128) AS "first_user",
LATEST_BY("user", CASE WHEN CAST("timestamp" AS BIGINT) > 0 THEN MILLIS_TO_TIMESTAMP(CAST("timestamp" AS BIGINT)) ELSE TIME_PARSE("timestamp") END, 128) AS "last_user"
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 not a "fix", it is a workaround that allows the test to pass through the underlying code is broken. A better approach is to simply disable the test with a comment.

That is, this "fix" substitutes another test case (which works) for the test case which fails because it is revealing a bug.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree, this isn't a fix, it's a workaround, but the tests that are failing are not to check for aggregations. This is used for a few tests like BatchIngest test and ReindexTest, and any aggregation would work for these tests. Disabling them might make a part of the code untested instead. Should I disable these tests for now?

Copy link
Contributor

Choose a reason for hiding this comment

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

How about this. This test did, in fact, find a bug, so it is useful. But, the point of the test is actually to exercise something else.

So, maybe comment out the lines that fail. Ensure we have an Apache issue for the problem. Have that problem point to the test and say that, to see the bug, just uncomment the lines.

Then, go ahead and add your new lines so that the test passes.

This will achieve the short-term goal (clean test) while also ensuring we don't forget to fix the underlying issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks a lot for the suggestion! That sounds like a good way to handle this. I have made the changes.

FROM "source"
GROUP BY 1, 2
PARTITIONED BY DAY