phoenix git commit: PHOENIX-2129 Fix ArrayToStringFunctionTest#testDate (Dumindu Buddhika)
Repository: phoenix Updated Branches: refs/heads/4.x-HBase-1.0 04e9d58d1 - 7e808368e PHOENIX-2129 Fix ArrayToStringFunctionTest#testDate (Dumindu Buddhika) Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/7e808368 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/7e808368 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/7e808368 Branch: refs/heads/4.x-HBase-1.0 Commit: 7e808368e5ba09c0463ee8737160b9a994a5fd79 Parents: 04e9d58 Author: ramkrishna ramkrishna.s.vasude...@gmail.com Authored: Mon Jul 20 22:52:39 2015 +0530 Committer: ramkrishna ramkrishna.s.vasude...@gmail.com Committed: Mon Jul 20 22:56:17 2015 +0530 -- .../apache/phoenix/expression/ArrayToStringFunctionTest.java | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/phoenix/blob/7e808368/phoenix-core/src/test/java/org/apache/phoenix/expression/ArrayToStringFunctionTest.java -- diff --git a/phoenix-core/src/test/java/org/apache/phoenix/expression/ArrayToStringFunctionTest.java b/phoenix-core/src/test/java/org/apache/phoenix/expression/ArrayToStringFunctionTest.java index 92eb6b5..d219320 100644 --- a/phoenix-core/src/test/java/org/apache/phoenix/expression/ArrayToStringFunctionTest.java +++ b/phoenix-core/src/test/java/org/apache/phoenix/expression/ArrayToStringFunctionTest.java @@ -141,7 +141,11 @@ public class ArrayToStringFunctionTest { PhoenixArray arr = new PhoenixArray(base, o1); String delimiter = , ; String nullString = *; -String expected = 1970-01-01, 1970-01-01, 1970-01-01; +String expected = ; +for (int i = 0; i o1.length - 1; i++) { +expected += o1[i].toString() + , ; +} +expected += o1[o1.length - 1]; test(arr, type, null, null, delimiter, nullString, expected, SortOrder.ASC, SortOrder.ASC, SortOrder.ASC); test(arr, type, null, null, delimiter, nullString, expected, SortOrder.DESC, SortOrder.ASC, SortOrder.ASC); }
phoenix git commit: PHOENIX-2129 Fix ArrayToStringFunctionTest#testDate (Dumindu Buddhika)
Repository: phoenix Updated Branches: refs/heads/master b38a62431 - 936de8815 PHOENIX-2129 Fix ArrayToStringFunctionTest#testDate (Dumindu Buddhika) Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/936de881 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/936de881 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/936de881 Branch: refs/heads/master Commit: 936de881575423c9242d083e5852e82017905977 Parents: b38a624 Author: ramkrishna ramkrishna.s.vasude...@gmail.com Authored: Mon Jul 20 22:52:39 2015 +0530 Committer: ramkrishna ramkrishna.s.vasude...@gmail.com Committed: Mon Jul 20 22:52:39 2015 +0530 -- .../apache/phoenix/expression/ArrayToStringFunctionTest.java | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/phoenix/blob/936de881/phoenix-core/src/test/java/org/apache/phoenix/expression/ArrayToStringFunctionTest.java -- diff --git a/phoenix-core/src/test/java/org/apache/phoenix/expression/ArrayToStringFunctionTest.java b/phoenix-core/src/test/java/org/apache/phoenix/expression/ArrayToStringFunctionTest.java index d97f117..5ca266d 100644 --- a/phoenix-core/src/test/java/org/apache/phoenix/expression/ArrayToStringFunctionTest.java +++ b/phoenix-core/src/test/java/org/apache/phoenix/expression/ArrayToStringFunctionTest.java @@ -135,7 +135,6 @@ public class ArrayToStringFunctionTest { } @Test -@Ignore public void testDate() throws SQLException { PDataType type = PDateArray.INSTANCE; PDataType base = PDate.INSTANCE; @@ -143,7 +142,11 @@ public class ArrayToStringFunctionTest { PhoenixArray arr = new PhoenixArray(base, o1); String delimiter = , ; String nullString = *; -String expected = 1970-01-01, 1970-01-01, 1970-01-01; +String expected = ; +for (int i = 0; i o1.length - 1; i++) { +expected += o1[i].toString() + , ; +} +expected += o1[o1.length - 1]; test(arr, type, null, null, delimiter, nullString, expected, SortOrder.ASC, SortOrder.ASC, SortOrder.ASC); test(arr, type, null, null, delimiter, nullString, expected, SortOrder.DESC, SortOrder.ASC, SortOrder.ASC); }
phoenix git commit: PHOENIX-2129 Fix ArrayToStringFunctionTest#testDate (Dumindu Buddhika)
Repository: phoenix Updated Branches: refs/heads/4.x-HBase-0.98 8eb9afeb6 - b08ce6c98 PHOENIX-2129 Fix ArrayToStringFunctionTest#testDate (Dumindu Buddhika) Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/b08ce6c9 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/b08ce6c9 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/b08ce6c9 Branch: refs/heads/4.x-HBase-0.98 Commit: b08ce6c984de7a3ffa0f510abcef1daf9e417f8e Parents: 8eb9afe Author: ramkrishna ramkrishna.s.vasude...@gmail.com Authored: Mon Jul 20 22:52:39 2015 +0530 Committer: ramkrishna ramkrishna.s.vasude...@gmail.com Committed: Mon Jul 20 22:56:53 2015 +0530 -- .../apache/phoenix/expression/ArrayToStringFunctionTest.java | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/phoenix/blob/b08ce6c9/phoenix-core/src/test/java/org/apache/phoenix/expression/ArrayToStringFunctionTest.java -- diff --git a/phoenix-core/src/test/java/org/apache/phoenix/expression/ArrayToStringFunctionTest.java b/phoenix-core/src/test/java/org/apache/phoenix/expression/ArrayToStringFunctionTest.java index d97f117..5ca266d 100644 --- a/phoenix-core/src/test/java/org/apache/phoenix/expression/ArrayToStringFunctionTest.java +++ b/phoenix-core/src/test/java/org/apache/phoenix/expression/ArrayToStringFunctionTest.java @@ -135,7 +135,6 @@ public class ArrayToStringFunctionTest { } @Test -@Ignore public void testDate() throws SQLException { PDataType type = PDateArray.INSTANCE; PDataType base = PDate.INSTANCE; @@ -143,7 +142,11 @@ public class ArrayToStringFunctionTest { PhoenixArray arr = new PhoenixArray(base, o1); String delimiter = , ; String nullString = *; -String expected = 1970-01-01, 1970-01-01, 1970-01-01; +String expected = ; +for (int i = 0; i o1.length - 1; i++) { +expected += o1[i].toString() + , ; +} +expected += o1[o1.length - 1]; test(arr, type, null, null, delimiter, nullString, expected, SortOrder.ASC, SortOrder.ASC, SortOrder.ASC); test(arr, type, null, null, delimiter, nullString, expected, SortOrder.DESC, SortOrder.ASC, SortOrder.ASC); }