[ 
https://issues.apache.org/jira/browse/HIVE-10787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14554796#comment-14554796
 ] 

Hive QA commented on HIVE-10787:
--------------------------------



{color:green}Overall{color}: +1 all checks pass

Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12734579/HIVE-10787.1.patch

{color:green}SUCCESS:{color} +1 8967 tests passed

Test results: 
http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/3988/testReport
Console output: 
http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/3988/console
Test logs: 
http://ec2-174-129-184-35.compute-1.amazonaws.com/logs/PreCommit-HIVE-TRUNK-Build-3988/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12734579 - PreCommit-HIVE-TRUNK-Build

> MatchPath misses the last matched row from the final result set
> ---------------------------------------------------------------
>
>                 Key: HIVE-10787
>                 URL: https://issues.apache.org/jira/browse/HIVE-10787
>             Project: Hive
>          Issue Type: Bug
>          Components: UDF
>    Affects Versions: 1.2.0
>            Reporter: Mohammad Kamrul Islam
>            Assignee: Mohammad Kamrul Islam
>         Attachments: HIVE-10787.1.patch
>
>
> For example, if you have a STAR(*) pattern at the end, the current code 
> misses the last row from the final result.  For example, if I have pattern 
> like (LATE.EARLY*), the matched rows are :
> 1. LATE
> 2. EARLY
> In the current implementation, the final 'tpath' missed the last "EARLY" and 
> returns only LATE . Ideally it should return LATE and EARLY.
> The following code snippets shows the bug.
> {noformat}
> 0. SymbolFunctionResult rowResult = symbolFn.match(row, pItr);
> 1. while (rowResult.matches && pItr.hasNext())
> 2.    {
> 3.      row = pItr.next();
> 4.        rowResult = symbolFn.match(row, pItr);
> 5.      }
> 6.
> 7.      result.nextRow = pItr.getIndex() - 1;
> {noformat}
> Line 7 of the code always moves the row index by one. If ,in some cases, loop 
> (line 1)  is never executed (due to pItr.hasNext() being 'false'), the code 
> still moves the row pointer back by one. Although the line 0 found the first 
> match and the iterator reaches to the end.
> I'm uploading a patch which I already tested.
>   



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to