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

Don't allow '__time' as a GroupBy output field name #3967

Merged
merged 2 commits into from Feb 23, 2017

Conversation

jon-wei
Copy link
Contributor

@jon-wei jon-wei commented Feb 23, 2017

Disallows __time as an output field for GroupBy queries

Fixes #3687

@jon-wei jon-wei added this to the 0.10.0 milestone Feb 23, 2017
@jon-wei jon-wei requested a review from gianm February 23, 2017 03:22
@jon-wei jon-wei changed the title Don't allow '__time' as a GroupBy column field name Don't allow '__time' as a GroupBy output field name Feb 23, 2017
@@ -572,6 +573,10 @@ private static void verifyOutputNames(
throw new IAE("Duplicate output name[%s]", postAggregator.getName());
}
}

if (outputNames.contains(Column.TIME_COLUMN_NAME)) {
throw new IAE("'__time' cannot be used as an output name for dimensions, aggregators, or post-aggregators.");
Copy link
Contributor

Choose a reason for hiding this comment

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

Might as well do %s and Column.TIME_COLUMN_NAME here since you went to the trouble of doing it in the if check.

@b-slim
Copy link
Contributor

b-slim commented Feb 23, 2017

👍 after nit fix for log msg

@fjy
Copy link
Contributor

fjy commented Feb 23, 2017

👍

@gianm
Copy link
Contributor

gianm commented Feb 23, 2017

@jon-wei, please update the log msg and then feel free to merge it yourself since there's enough +1s

@gianm gianm merged commit 58b704c into apache:master Feb 23, 2017
@jon-wei jon-wei deleted the there_is_no_time branch October 6, 2017 22:22
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

4 participants