You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/05/03 09:29:00 UTC

[jira] [Work logged] (HIVE-25061) PTF: Improve BoundaryCache / ValueBoundaryScanner

     [ https://issues.apache.org/jira/browse/HIVE-25061?focusedWorklogId=592090&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-592090 ]

ASF GitHub Bot logged work on HIVE-25061:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 03/May/21 09:28
            Start Date: 03/May/21 09:28
    Worklog Time Spent: 10m 
      Work Description: abstractdog commented on a change in pull request #2225:
URL: https://github.com/apache/hive/pull/2225#discussion_r624975027



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/udf/ptf/ValueBoundaryScanner.java
##########
@@ -414,16 +423,35 @@ protected int computeStartPreceding(int rowIdx, PTFPartition p) throws HiveExcep
       return r + 1;
     }
     else { // Use Case 5.
+      Pair<Integer, Object> start = binaryPreSearchBack(r, p, sortKey, rowVal, amt);
+      //start again with linear search from the last point where !isDistanceGreater was true
+      r = start.getLeft();
+      rowVal = start.getRight();
       while (r >= 0 && !isDistanceGreater(sortKey, rowVal, amt) ) {
         Pair<Integer, Object> stepResult = skipOrStepBack(r, p);
         r = stepResult.getLeft();
         rowVal = stepResult.getRight();
       }
-
       return r + 1;
     }
   }
 
+  private Pair<Integer, Object> binaryPreSearchBack(int r, PTFPartition p, Object sortKey,

Review comment:
       makes sense, this is a WIP patch, I'll still need to add at least binaryPreSearchForward for forward searching




-- 
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:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 592090)
    Time Spent: 50m  (was: 40m)

> PTF: Improve BoundaryCache / ValueBoundaryScanner
> -------------------------------------------------
>
>                 Key: HIVE-25061
>                 URL: https://issues.apache.org/jira/browse/HIVE-25061
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: László Bodor
>            Assignee: László Bodor
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.0.0
>
>         Attachments: Screen Shot 2021-04-27 at 1.02.37 PM.png
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> First, I need to check whether TreeMap is really needed for our case.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)