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

Web console: Do not put __time in the dimensions list #11085

Merged
merged 2 commits into from
Apr 12, 2021

Conversation

vogievetsky
Copy link
Contributor

A change made in #10267 to forbid __time in the dimensions list has exposed the fact that the transform step of the data loader did just that.

{
type: 'expression',
name: 'barPage',
expression: "concat('foo' + page)",
Copy link
Member

Choose a reason for hiding this comment

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

heh, barPage concats 'foo'?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test is also verifying that running this function on transforms that have the same expression does not does not cause an asynchronous desynchronization of the DOM rendering thread with the memory management subsystem thereby causing memory liquefaction, which will cause a memory leek and water damage the browser.

Copy link
Member

Choose a reason for hiding this comment

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

good catch! we don't want our Druid bits to get too corroded from any water spillover into the query request packets, else we might one day wake up to find all our code has been converted to rust.

Copy link
Contributor

Choose a reason for hiding this comment

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

😐

@gianm
Copy link
Contributor

gianm commented Apr 9, 2021

Could you add an end-to-end test too? Manipulations of __time during ingest seem like a potentially tricky area in general, and an end to end test would be helpful to make sure it always keeps working in the future.

@vogievetsky
Copy link
Contributor Author

I'll see what I can do

@@ -195,6 +191,7 @@ async function validateQuery(page: playwright.Page, datasourceName: string) {
/* page */ 'Talk:Oswald Tilghman',
/* regionIsoCode */ 'null',
/* regionName */ 'null',
/* time */ '2015-09-12T00:46:58.771Z',
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 updated the e2e test and realized/was faced with this interesting side-effect:
If you specify the time column via the timestampSpec then that column gets excluded from the dimension auto-detection system. If instead you use a transform to construct a __time dimension then (obviously) the component dimensions do not get removed from the auto detection. In this case I set __time to be timestamp_parse("time") + 1 and now clicking though all the defaults yields an extra field, the original time column.

Copy link
Contributor

Choose a reason for hiding this comment

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

Does this cause a problem? It's documented behavior (item 3): https://druid.apache.org/docs/latest/ingestion/index.html#inclusions-and-exclusions

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, it is not a problem. Just something that took me by surprise. Simply because I did not put 1 + 1 together. Maybe there should be some docs of this inside the web console.

@vogievetsky vogievetsky merged commit 8432d82 into apache:master Apr 12, 2021
@vogievetsky vogievetsky deleted the no_time_dimensions branch April 12, 2021 16:48
@clintropolis clintropolis added this to the 0.22.0 milestone Aug 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants