trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbirds...@apache.org
Subject [1/2] incubator-trafodion git commit: Fixed 2 date related issues in phoenix tests
Date Fri, 26 Feb 2016 23:10:11 GMT
Repository: incubator-trafodion
Updated Branches:
  refs/heads/master fa430a025 -> fabfc80d7


Fixed 2 date related issues in phoenix tests

(1) MM-DD-YYYY format is no longer supported.  Changed it to MM/DD/YYYY
(2) Added an extra order by column to reinforce the row order of a date column.


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/1d88e823
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/1d88e823
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/1d88e823

Branch: refs/heads/master
Commit: 1d88e823fab1f7139bb45f959d23016629b437ce
Parents: fa430a0
Author: wtsai <wtsai@qa-cent-1.novalocal>
Authored: Thu Feb 25 23:12:43 2016 +0000
Committer: wtsai <wtsai@qa-cent-1.novalocal>
Committed: Thu Feb 25 23:12:43 2016 +0000

----------------------------------------------------------------------
 .../org/trafodion/phoenix/end2end/DescColumnSortOrderTest.java     | 2 +-
 .../java/org/trafodion/phoenix/end2end/ProductMetricsTest.java     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1d88e823/tests/phx/src/test/java/org/trafodion/phoenix/end2end/DescColumnSortOrderTest.java
----------------------------------------------------------------------
diff --git a/tests/phx/src/test/java/org/trafodion/phoenix/end2end/DescColumnSortOrderTest.java
b/tests/phx/src/test/java/org/trafodion/phoenix/end2end/DescColumnSortOrderTest.java
index 07d492b..50d90b7 100644
--- a/tests/phx/src/test/java/org/trafodion/phoenix/end2end/DescColumnSortOrderTest.java
+++ b/tests/phx/src/test/java/org/trafodion/phoenix/end2end/DescColumnSortOrderTest.java
@@ -482,7 +482,7 @@ public class DescColumnSortOrderTest extends BaseTest {
         Object[][] expectedRows = new Object[][]{{2, date(1, 1, 2001)}};
 
         if (tgtPH()) runQueryTest(ddl, upsert("id", "date"), insertedRows, expectedRows,
new WhereCondition("date", "<", "TO_DATE('02-02-2001','mm-dd-yyyy')"));
-        else if (tgtSQ()||tgtTR()) runQueryTest(ddl, upsert("id", "date1"), insertedRows,
expectedRows, new WhereCondition("date1", "<", "DATE '02-02-2001'"));
+        else if (tgtSQ()||tgtTR()) runQueryTest(ddl, upsert("id", "date1"), insertedRows,
expectedRows, new WhereCondition("date1", "<", "DATE '02/02/2001'"));
     }
     
     private void runQueryTest(String ddl, String columnName, Object[][] rows, Object[][]
expectedRows) throws Exception {

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1d88e823/tests/phx/src/test/java/org/trafodion/phoenix/end2end/ProductMetricsTest.java
----------------------------------------------------------------------
diff --git a/tests/phx/src/test/java/org/trafodion/phoenix/end2end/ProductMetricsTest.java
b/tests/phx/src/test/java/org/trafodion/phoenix/end2end/ProductMetricsTest.java
index e246d8c..56e208a 100644
--- a/tests/phx/src/test/java/org/trafodion/phoenix/end2end/ProductMetricsTest.java
+++ b/tests/phx/src/test/java/org/trafodion/phoenix/end2end/ProductMetricsTest.java
@@ -757,7 +757,7 @@ public class ProductMetricsTest extends BaseTest {
 
         String query = null;
         if (tgtPH()) query = "SELECT round(date,'hour',1),feature,sum(unique_users) FROM
PRODUCT_METRICS WHERE organization_id=? GROUP BY round(date,'hour',1),feature";
-        else if (tgtSQ()||tgtTR()) query = "SELECT date_trunc('hour',date_add(date1,interval
'30' minute)),feature,sum(unique_users) FROM PRODUCT_METRICS WHERE organization_id=? GROUP
BY date_trunc('hour',date_add(date1,interval '30' minute)),feature order by 3";
+        else if (tgtSQ()||tgtTR()) query = "SELECT date_trunc('hour',date_add(date1,interval
'30' minute)),feature,sum(unique_users) FROM PRODUCT_METRICS WHERE organization_id=? GROUP
BY date_trunc('hour',date_add(date1,interval '30' minute)),feature order by 3, 1";
         try {
             initTableValues();
             PreparedStatement statement = conn.prepareStatement(query);


Mime
View raw message