[
https://issues.apache.org/jira/browse/HIVE-23462?focusedWorklogId=438737&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-438737
]
ASF GitHub Bot logged work on HIVE-23462:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 29/May/20 13:25
Start Date: 29/May/20 13:25
Worklog Time Spent: 10m
Work Description: kgyrtkirk commented on a change in pull request #1031:
URL: https://github.com/apache/hive/pull/1031#discussion_r432480302
##########
File path:
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveRewriteToDataSketchesRules.java
##########
@@ -368,4 +389,216 @@ void rewrite(AggregateCall aggCall) {
}
}
}
+
+ /**
+ * Generic support for rewriting Windowing expression into a different form
usually using joins.
+ */
+ private static abstract class WindowingToProjectAggregateJoinProject extends
RelOptRule {
+
+ protected final String sketchType;
+
+ public WindowingToProjectAggregateJoinProject(String sketchType) {
+ super(operand(HiveProject.class, any()));
+ this.sketchType = sketchType;
+ }
+
+ @Override
+ public void onMatch(RelOptRuleCall call) {
+
+ final Project project = call.rel(0);
+
+ VbuilderPAP vb = buildProcessor(call);
+ RelNode newProject = vb.processProject(project);
+
+ if (newProject instanceof Project && ((Project)
newProject).getChildExps().equals(project.getChildExps())) {
Review comment:
done it a bit differently - but the end result is the same
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 438737)
Time Spent: 1h 20m (was: 1h 10m)
> Add option to rewrite NTILE to sketch functions
> -----------------------------------------------
>
> Key: HIVE-23462
> URL: https://issues.apache.org/jira/browse/HIVE-23462
> Project: Hive
> Issue Type: Sub-task
> Reporter: Zoltan Haindrich
> Assignee: Zoltan Haindrich
> Priority: Major
> Labels: pull-request-available
> Attachments: HIVE-23462.01.patch, HIVE-23462.02.patch,
> HIVE-23462.03.patch, HIVE-23462.04.patch
>
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)