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

Elide 5 Agg Store: Multiple time grains #1806

Merged
merged 32 commits into from
Feb 4, 2021
Merged

Elide 5 Agg Store: Multiple time grains #1806

merged 32 commits into from
Feb 4, 2021

Conversation

aklish
Copy link
Member

@aklish aklish commented Feb 1, 2021

  • Adds back support for parameterized time grains.
  • Converts time parsing to java.time libraries (instead of legacy java.util).

License

I confirm that this contribution is made under an Apache 2.0 license and that I have the authority necessary to make this contribution on behalf of its copyright owner.


/**
* Time Grain class for Week.
*/
public class Week extends Date {
public class Week extends Time {

public static final String FORMAT = "yyyy-MM-dd";
Copy link
Collaborator

Choose a reason for hiding this comment

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

This can be removed as its not used.

@DimensionFormula("<%#trimColumnReferences definition%><%/trimColumnReferences%>")
<%#ifTypeMatches type "TIME"%>
public com.yahoo.elide.datastores.aggregation.timegrains.<%#getGrainType grain%><%/getGrainType%> get<%#capitalizeFirstLetter name%> <%/capitalizeFirstLetter%>() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

getGrainType method can be removed from HandlebarsHelper.

@@ -141,6 +142,8 @@ public String getJavaType(Type type) {
return BIGDECIMAL;
case MONEY:
return BIGDECIMAL;
case TIME:
return DATE;
Copy link
Collaborator

Choose a reason for hiding this comment

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

if we return "Time" instead of "Date", we can remove if-else block for dimension type in table.hbs file.
Otherwise this is unused and can be removed.

rishi-aga
rishi-aga previously approved these changes Feb 4, 2021
@aklish aklish merged commit ba73bc2 into master Feb 4, 2021
@aklish aklish deleted the MultipleTimeGrains branch February 4, 2021 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants