Build failed in Jenkins: Phoenix | 4.0 | Hadoop2 #68
See https://builds.apache.org/job/Phoenix-4.0-hadoop2/68/ -- [...truncated 731 lines...] remote: Counting objects: 5469 remote: Counting objects: 5473 remote: Counting objects: 5474 remote: Counting objects: 5485 remote: Counting objects: 5489 remote: Counting objects: 5490 remote: Counting objects: 5495 remote: Counting objects: 5502 remote: Counting objects: 5507 remote: Counting objects: 5533 remote: Counting objects: 5724 remote: Counting objects: 5731 remote: Counting objects: 5734 remote: Counting objects: 5753 remote: Counting objects: 5769 remote: Counting objects: 5791 remote: Counting objects: 5795 remote: Counting objects: 5813 remote: Counting objects: 5827 remote: Counting objects: 5837 remote: Counting objects: 5850 remote: Counting objects: 5859 remote: Counting objects: 5872 remote: Counting objects: 5909 remote: Counting objects: 5923 remote: Counting objects: 5932 remote: Counting objects: 6018 remote: Counting objects: 6044 remote: Counting objects: 6115 remote: Counting objects: 6165 remote: Counting objects: 6176 remote: Counting objects: 6182 remote: Counting objects: 6219 remote: Counting objects: 6234 remote: Counting objects: 6249 remote: Counting objects: 6261 remote: Counting objects: 6276 remote: Counting objects: 6285 remote: Counting objects: 6306 remote: Counting objects: 6307 remote: Counting objects: 6308 remote: Counting objects: 6319 remote: Counting objects: 6329 remote: Counting objects: 6341 remote: Counting objects: 6349 remote: Counting objects: 6366 remote: Counting objects: 6394 remote: Counting objects: 6403 remote: Counting objects: 6425 remote: Counting objects: 6435 remote: Counting objects: 6446 remote: Counting objects: 6460 remote: Counting objects: 6474 remote: Counting objects: 6505 remote: Counting objects: 6523 remote: Counting objects: 6545 remote: Counting objects: 6556 remote: Counting objects: 6560 remote: Counting objects: 6606 remote: Counting objects: 6614 remote: Counting objects: 6625 remote: Counting objects: 6632 remote: Counting objects: 6640 remote: Counting objects: 6652 remote: Counting objects: 6659 remote: Counting objects: 6663 remote: Counting objects: 6674 remote: Counting objects: 6677 remote: Counting objects: 6680 remote: Counting objects: 6681 remote: Counting objects: 6683 remote: Counting objects: 6687 remote: Counting objects: 6689 remote: Counting objects: 6690 remote: Counting objects: 6692 remote: Counting objects: 6693 remote: Counting objects: 6695 remote: Counting objects: 6696 remote: Counting objects: 6697 remote: Counting objects: 6703 remote: Counting objects: 6715 remote: Counting objects: 6722 remote: Counting objects: 6726 remote: Counting objects: 6731 remote: Counting objects: 6741 remote: Counting objects: 6743 remote: Counting objects: 6745 remote: Counting objects: 6747 remote: Counting objects: 6751 remote: Counting objects: 6762 remote: Counting objects: 6767 remote: Counting objects: 6772 remote: Counting objects: 6779 remote: Counting objects: 6795 remote: Counting objects: 6804 remote: Counting objects: 6806 remote: Counting objects: 6814 remote: Counting objects: 6820 remote: Counting objects: 6835 remote: Counting objects: 6845 remote: Counting objects: 6857 remote: Counting objects: 6864 remote: Counting objects: 6888 remote: Counting objects: 6925 remote: Counting objects: 6931 remote: Counting objects: 6939 remote: Counting objects: 6952 remote: Counting objects: 6959 remote: Counting objects: 6981 remote: Counting objects: 6996 remote: Counting objects: 7001 remote: Counting objects: 7011 remote: Counting objects: 7051 remote: Counting objects: 7071 remote: Counting objects: 7085 remote: Counting objects: 7111
git commit: PHOENIX-761 Implement getKeyPart for round/ceil/floor of a DECIMAL value (Kyle Buzsaki)
Repository: phoenix Updated Branches: refs/heads/4.0 4028255b7 - 4709afa3c PHOENIX-761 Implement getKeyPart for round/ceil/floor of a DECIMAL value (Kyle Buzsaki) Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/4709afa3 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/4709afa3 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/4709afa3 Branch: refs/heads/4.0 Commit: 4709afa3cfbb3aa6e8c0726cc3de7887e6aa2dfe Parents: 4028255 Author: James Taylor jtay...@salesforce.com Authored: Tue Aug 26 22:42:23 2014 -0700 Committer: James Taylor jtay...@salesforce.com Committed: Tue Aug 26 22:42:23 2014 -0700 -- .../function/CeilDecimalExpression.java | 89 +-- .../function/FloorDecimalExpression.java| 40 +- .../function/RoundDecimalExpression.java| 250 +++- .../RoundFloorCeilExpressionsTest.java | 582 +++ 4 files changed, 800 insertions(+), 161 deletions(-) -- http://git-wip-us.apache.org/repos/asf/phoenix/blob/4709afa3/phoenix-core/src/main/java/org/apache/phoenix/expression/function/CeilDecimalExpression.java -- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/expression/function/CeilDecimalExpression.java b/phoenix-core/src/main/java/org/apache/phoenix/expression/function/CeilDecimalExpression.java index 5e3f2f6..d6b4e45 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/expression/function/CeilDecimalExpression.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/expression/function/CeilDecimalExpression.java @@ -26,63 +26,80 @@ import org.apache.phoenix.expression.LiteralExpression; import org.apache.phoenix.schema.PDataType; import com.google.common.collect.Lists; +import java.math.BigDecimal; +import org.apache.phoenix.query.KeyRange; +import static org.apache.phoenix.schema.PDataType.DECIMAL; /** - * + * * Class encapsulating the CEIL operation on a {@link org.apache.phoenix.schema.PDataType#DECIMAL} * - * + * * @since 3.0.0 */ public class CeilDecimalExpression extends RoundDecimalExpression { - + public CeilDecimalExpression() {} - + private CeilDecimalExpression(ListExpression children) { super(children); } - - /** - * Creates a {@link CeilDecimalExpression} with rounding scale given by @param scale. - * - */ - public static Expression create(Expression expr, int scale) throws SQLException { + +/** + * Creates a {@link CeilDecimalExpression} with rounding scale given by @param scale. + * + */ +public static Expression create(Expression expr, int scale) throws SQLException { if (expr.getDataType().isCoercibleTo(PDataType.LONG)) { - return expr; - } - Expression scaleExpr = LiteralExpression.newConstant(scale, PDataType.INTEGER, true); - ListExpression expressions = Lists.newArrayList(expr, scaleExpr); - return new CeilDecimalExpression(expressions); - } - - public static Expression create(ListExpression exprs) throws SQLException { - Expression expr = exprs.get(0); +return expr; +} +Expression scaleExpr = LiteralExpression.newConstant(scale, PDataType.INTEGER, true); +ListExpression expressions = Lists.newArrayList(expr, scaleExpr); +return new CeilDecimalExpression(expressions); +} + +public static Expression create(ListExpression exprs) throws SQLException { +Expression expr = exprs.get(0); if (expr.getDataType().isCoercibleTo(PDataType.LONG)) { - return expr; - } +return expr; +} if (exprs.size() == 1) { - Expression scaleExpr = LiteralExpression.newConstant(0, PDataType.INTEGER, true); - exprs = Lists.newArrayList(expr, scaleExpr); - } - return new CeilDecimalExpression(exprs); - } - - /** -* Creates a {@link CeilDecimalExpression} with a default scale of 0 used for rounding. -* -*/ - public static Expression create(Expression expr) throws SQLException { - return create(expr, 0); - } - +Expression scaleExpr = LiteralExpression.newConstant(0, PDataType.INTEGER, true); +exprs = Lists.newArrayList(expr, scaleExpr); +} +return new CeilDecimalExpression(exprs); +} + +/** + * Creates a {@link CeilDecimalExpression} with a default scale of 0 used for rounding. + * + */ +public static Expression create(Expression expr) throws SQLException { +return create(expr, 0); +} + @Override protected RoundingMode getRoundingMode() { return RoundingMode.CEILING; } - + @Override public String getName() {
git commit: PHOENIX-761 Implement getKeyPart for round/ceil/floor of a DECIMAL value (Kyle Buzsaki)
Repository: phoenix Updated Branches: refs/heads/master 0e42f3a1f - 29c610cfd PHOENIX-761 Implement getKeyPart for round/ceil/floor of a DECIMAL value (Kyle Buzsaki) Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/29c610cf Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/29c610cf Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/29c610cf Branch: refs/heads/master Commit: 29c610cfdec8414d0b35f2e66b7090f540c48eb7 Parents: 0e42f3a Author: James Taylor jtay...@salesforce.com Authored: Tue Aug 26 22:43:57 2014 -0700 Committer: James Taylor jtay...@salesforce.com Committed: Tue Aug 26 22:43:57 2014 -0700 -- .../function/CeilDecimalExpression.java | 89 +-- .../function/FloorDecimalExpression.java| 40 +- .../function/RoundDecimalExpression.java| 250 +++- .../RoundFloorCeilExpressionsTest.java | 582 +++ 4 files changed, 800 insertions(+), 161 deletions(-) -- http://git-wip-us.apache.org/repos/asf/phoenix/blob/29c610cf/phoenix-core/src/main/java/org/apache/phoenix/expression/function/CeilDecimalExpression.java -- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/expression/function/CeilDecimalExpression.java b/phoenix-core/src/main/java/org/apache/phoenix/expression/function/CeilDecimalExpression.java index 5e3f2f6..d6b4e45 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/expression/function/CeilDecimalExpression.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/expression/function/CeilDecimalExpression.java @@ -26,63 +26,80 @@ import org.apache.phoenix.expression.LiteralExpression; import org.apache.phoenix.schema.PDataType; import com.google.common.collect.Lists; +import java.math.BigDecimal; +import org.apache.phoenix.query.KeyRange; +import static org.apache.phoenix.schema.PDataType.DECIMAL; /** - * + * * Class encapsulating the CEIL operation on a {@link org.apache.phoenix.schema.PDataType#DECIMAL} * - * + * * @since 3.0.0 */ public class CeilDecimalExpression extends RoundDecimalExpression { - + public CeilDecimalExpression() {} - + private CeilDecimalExpression(ListExpression children) { super(children); } - - /** - * Creates a {@link CeilDecimalExpression} with rounding scale given by @param scale. - * - */ - public static Expression create(Expression expr, int scale) throws SQLException { + +/** + * Creates a {@link CeilDecimalExpression} with rounding scale given by @param scale. + * + */ +public static Expression create(Expression expr, int scale) throws SQLException { if (expr.getDataType().isCoercibleTo(PDataType.LONG)) { - return expr; - } - Expression scaleExpr = LiteralExpression.newConstant(scale, PDataType.INTEGER, true); - ListExpression expressions = Lists.newArrayList(expr, scaleExpr); - return new CeilDecimalExpression(expressions); - } - - public static Expression create(ListExpression exprs) throws SQLException { - Expression expr = exprs.get(0); +return expr; +} +Expression scaleExpr = LiteralExpression.newConstant(scale, PDataType.INTEGER, true); +ListExpression expressions = Lists.newArrayList(expr, scaleExpr); +return new CeilDecimalExpression(expressions); +} + +public static Expression create(ListExpression exprs) throws SQLException { +Expression expr = exprs.get(0); if (expr.getDataType().isCoercibleTo(PDataType.LONG)) { - return expr; - } +return expr; +} if (exprs.size() == 1) { - Expression scaleExpr = LiteralExpression.newConstant(0, PDataType.INTEGER, true); - exprs = Lists.newArrayList(expr, scaleExpr); - } - return new CeilDecimalExpression(exprs); - } - - /** -* Creates a {@link CeilDecimalExpression} with a default scale of 0 used for rounding. -* -*/ - public static Expression create(Expression expr) throws SQLException { - return create(expr, 0); - } - +Expression scaleExpr = LiteralExpression.newConstant(0, PDataType.INTEGER, true); +exprs = Lists.newArrayList(expr, scaleExpr); +} +return new CeilDecimalExpression(exprs); +} + +/** + * Creates a {@link CeilDecimalExpression} with a default scale of 0 used for rounding. + * + */ +public static Expression create(Expression expr) throws SQLException { +return create(expr, 0); +} + @Override protected RoundingMode getRoundingMode() { return RoundingMode.CEILING; } - + @Override public String getName()