[
https://issues.apache.org/jira/browse/PHOENIX-3716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15896054#comment-15896054
]
Hadoop QA commented on PHOENIX-3716:
------------------------------------
{color:red}-1 overall{color}. Here are the results of testing the latest
attachment
http://issues.apache.org/jira/secure/attachment/12856163/PHOENIX-3716.patch
against master branch at commit c8612fa1b09f883726102951626798244f73db17.
ATTACHMENT ID: 12856163
{color:green}+1 @author{color}. The patch does not contain any @author
tags.
{color:green}+1 tests included{color}. The patch appears to include 6 new
or modified tests.
{color:green}+1 javac{color}. The applied patch does not increase the
total number of javac compiler warnings.
{color:red}-1 javadoc{color}. The javadoc tool appears to have generated
45 warning messages.
{color:red}-1 release audit{color}. The applied patch generated 1 release
audit warnings (more than the master's current 0 warnings).
{color:red}-1 lineLengths{color}. The patch introduces the following lines
longer than 100:
+ private static void testExpression(LiteralExpression array,
LiteralExpression element, Integer expected)
+ Integer result = (Integer)
ArrayRegexFindFunction.getDataType().toObject(ptr,
expressions.get(0).getSortOrder(), array.getMaxLength(), array.getScale());
+ private static void test(PhoenixArray array, Object element, PDataType
arrayDataType, Integer arrMaxLen, Integer arrScale, PDataType elementDataType,
Integer elemMaxLen, Integer elemScale, Integer expected, SortOrder
arraySortOrder, SortOrder elementSortOrder) throws SQLException {
+ arrayLiteral = LiteralExpression.newConstant(array, arrayDataType,
arrMaxLen, arrScale, arraySortOrder, Determinism.ALWAYS);
+ elementLiteral = LiteralExpression.newConstant(element,
elementDataType, elemMaxLen, elemScale, elementSortOrder, Determinism.ALWAYS);
+ test(arr, element, PDataType.fromTypeId(baseType.getSqlType() +
PDataType.ARRAY_TYPE_BASE), null, null, baseType, null, null, expected,
SortOrder.ASC, SortOrder.ASC);
+ test(arr, element, PDataType.fromTypeId(baseType.getSqlType() +
PDataType.ARRAY_TYPE_BASE), null, null, baseType, null, null, expected,
SortOrder.ASC, SortOrder.ASC);
+ test(arr, element, PDataType.fromTypeId(baseType.getSqlType() +
PDataType.ARRAY_TYPE_BASE), null, null, baseType, null, null, expected,
SortOrder.ASC, SortOrder.ASC);
+ test(arr, element, PDataType.fromTypeId(baseType.getSqlType() +
PDataType.ARRAY_TYPE_BASE), null, null, baseType, null, null, expected,
SortOrder.ASC, SortOrder.ASC);
+ PhoenixArray array = (PhoenixArray)
arrayExpr.getDataType().toObject(ptr, arrayExpr.getSortOrder(),
arrayExpr.getMaxLength(), arrayExpr.getScale());
{color:red}-1 core tests{color}. The patch failed these unit tests:
./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.index.MutableIndexFailureIT
Test results:
https://builds.apache.org/job/PreCommit-PHOENIX-Build/792//testReport/
Release audit warnings:
https://builds.apache.org/job/PreCommit-PHOENIX-Build/792//artifact/patchprocess/patchReleaseAuditWarnings.txt
Javadoc warnings:
https://builds.apache.org/job/PreCommit-PHOENIX-Build/792//artifact/patchprocess/patchJavadocWarnings.txt
Console output:
https://builds.apache.org/job/PreCommit-PHOENIX-Build/792//console
This message is automatically generated.
> Functions to find/match an element's position in an array
> ---------------------------------------------------------
>
> Key: PHOENIX-3716
> URL: https://issues.apache.org/jira/browse/PHOENIX-3716
> Project: Phoenix
> Issue Type: New Feature
> Affects Versions: 4.7.0, 4.8.0, 4.9.0, 4.10.0
> Reporter: Alok Singh
> Priority: Minor
> Attachments: PHOENIX-3716.patch
>
>
> ARRAY_FIND and ARRAY_REGEX_FIND functions to get the position of an element
> in an array. ARRAY_FIND is analogous to the 'INSTR' function while
> ARRAY_REGEX_FIND uses the specified regular expression to perform the match.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)