[jira] [Commented] (HAWQ-917) Refactor feature tests for data type check with new googletest framework
[ https://issues.apache.org/jira/browse/HAWQ-917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15382129#comment-15382129 ] ASF GitHub Bot commented on HAWQ-917: - Github user paul-guo- closed the pull request at: https://github.com/apache/incubator-hawq/pull/787 > Refactor feature tests for data type check with new googletest framework > > > Key: HAWQ-917 > URL: https://issues.apache.org/jira/browse/HAWQ-917 > Project: Apache HAWQ > Issue Type: Sub-task >Reporter: Paul Guo >Assignee: Paul Guo > Fix For: 2.0.1.0-incubating > > > This needs to refactor the following 15 test cases. > ../../../regress/sql/boolean.sql > ../../../regress/sql/char.sql > ../../../regress/sql/date.sql > ../../../regress/sql/float4.sql > ../../../regress/sql/float8.sql > ../../../regress/sql/int2.sql > ../../../regress/sql/int4.sql > ../../../regress/sql/int8.sql > ../../../regress/sql/money.sql > ../../../regress/sql/name.sql > ../../../regress/sql/oid.sql > ../../../regress/sql/text.sql > ../../../regress/sql/time.sql > ../../../regress/sql/type_sanity.sql > ../../../regress/sql/varchar.sql -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HAWQ-917) Refactor feature tests for data type check with new googletest framework
[ https://issues.apache.org/jira/browse/HAWQ-917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15379150#comment-15379150 ] ASF GitHub Bot commented on HAWQ-917: - Github user paul-guo- commented on the issue: https://github.com/apache/incubator-hawq/pull/787 Merged. > Refactor feature tests for data type check with new googletest framework > > > Key: HAWQ-917 > URL: https://issues.apache.org/jira/browse/HAWQ-917 > Project: Apache HAWQ > Issue Type: Sub-task >Reporter: Paul Guo >Assignee: Paul Guo > Fix For: 2.0.1.0-incubating > > > This needs to refactor the following 15 test cases. > ../../../regress/sql/boolean.sql > ../../../regress/sql/char.sql > ../../../regress/sql/date.sql > ../../../regress/sql/float4.sql > ../../../regress/sql/float8.sql > ../../../regress/sql/int2.sql > ../../../regress/sql/int4.sql > ../../../regress/sql/int8.sql > ../../../regress/sql/money.sql > ../../../regress/sql/name.sql > ../../../regress/sql/oid.sql > ../../../regress/sql/text.sql > ../../../regress/sql/time.sql > ../../../regress/sql/type_sanity.sql > ../../../regress/sql/varchar.sql -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HAWQ-917) Refactor feature tests for data type check with new googletest framework
[ https://issues.apache.org/jira/browse/HAWQ-917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15378998#comment-15378998 ] ASF GitHub Bot commented on HAWQ-917: - Github user xunzhang commented on the issue: https://github.com/apache/incubator-hawq/pull/787 +1 > Refactor feature tests for data type check with new googletest framework > > > Key: HAWQ-917 > URL: https://issues.apache.org/jira/browse/HAWQ-917 > Project: Apache HAWQ > Issue Type: Sub-task >Reporter: Paul Guo >Assignee: Paul Guo > Fix For: 2.0.1.0-incubating > > > This needs to refactor the following 15 test cases. > ../../../regress/sql/boolean.sql > ../../../regress/sql/char.sql > ../../../regress/sql/date.sql > ../../../regress/sql/float4.sql > ../../../regress/sql/float8.sql > ../../../regress/sql/int2.sql > ../../../regress/sql/int4.sql > ../../../regress/sql/int8.sql > ../../../regress/sql/money.sql > ../../../regress/sql/name.sql > ../../../regress/sql/oid.sql > ../../../regress/sql/text.sql > ../../../regress/sql/time.sql > ../../../regress/sql/type_sanity.sql > ../../../regress/sql/varchar.sql -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HAWQ-917) Refactor feature tests for data type check with new googletest framework
[ https://issues.apache.org/jira/browse/HAWQ-917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15378863#comment-15378863 ] ASF GitHub Bot commented on HAWQ-917: - Github user paul-guo- commented on a diff in the pull request: https://github.com/apache/incubator-hawq/pull/787#discussion_r70921905 --- Diff: src/test/feature/type/ans/int8.ans --- @@ -175,131 +179,131 @@ SELECT '' AS to_char_4, to_char( (q1 * -1), 'S'), to_char( (q2 * SELECT '' AS to_char_5, to_char(q2, 'MI') FROM INT8_TBL ; to_char_5 | to_char ---+--- - | 123 | 456 | 4567890123456789 + | 123 | 4567890123456789 | -4567890123456789 (5 rows) SELECT '' AS to_char_6, to_char(q2, 'FMS')FROM INT8_TBL ; to_char_6 | to_char ---+--- - | +123 | +456 - | -4567890123456789 | +4567890123456789 + | +123 | +4567890123456789 + | -4567890123456789 (5 rows) SELECT '' AS to_char_7, to_char(q2, 'FMTHPR') FROM INT8_TBL ; to_char_7 | to_char ---+ - | 123RD - | <4567890123456789> + | 456TH | 4567890123456789TH + | 123RD | 4567890123456789TH - | 456TH + | <4567890123456789> (5 rows) SELECT '' AS to_char_8, to_char(q2, 'SGth') FROM INT8_TBL ; to_char_8 | to_char ---+- - | + 123rd - | -4567890123456789 + | + 456th | +4567890123456789th + | + 123rd | +4567890123456789th - | + 456th + | -4567890123456789 (5 rows) SELECT '' AS to_char_9, to_char(q2, '0999') FROM INT8_TBL ; to_char_9 | to_char ---+--- - | 0123 | 0456 | 4567890123456789 + | 0123 | 4567890123456789 | -4567890123456789 (5 rows) SELECT '' AS to_char_10, to_char(q2, 'S0999') FROM INT8_TBL ; to_char_10 | to_char +--- -| +0123 | +0456 -| -4567890123456789 | +4567890123456789 +| +0123 | +4567890123456789 +| -4567890123456789 (5 rows) SELECT '' AS to_char_11, to_char(q2, 'FM0999') FROM INT8_TBL ; to_char_11 | to_char +--- -| 0123 | 0456 | 4567890123456789 +| 0123 | 4567890123456789 | -4567890123456789 (5 rows) SELECT '' AS to_char_12, to_char(q2, 'FM.000') FROM INT8_TBL ; to_char_12 |to_char +--- -| 123.000 | 456.000 -| -4567890123456789.000 | 4567890123456789.000 +| 123.000 | 4567890123456789.000 +| -4567890123456789.000 (5 rows) SELECT '' AS to_char_13, to_char(q2, 'L.000') FROM INT8_TBL ; to_char_13 |to_char + -|123.000 -|456.000 -| 4567890123456789.000 -| 4567890123456789.000 -| -4567890123456789.000 +| $ 456.000 +| $ 4567890123456789.000 +| $ 123.000 +| $ 4567890123456789.000 +| $-4567890123456789.000 --- End diff -- I'm leaving the to another JIRA HAWQ-925 Set default locale, timezone & datastyle before running sql command/file. That is for the whole feature test framework. > Refactor feature tests for data type check with new googletest framework > > > Key: HAWQ-917 > URL: https://issues.apache.org/jira/browse/HAWQ-917 > Project: Apache HAWQ >
[jira] [Commented] (HAWQ-917) Refactor feature tests for data type check with new googletest framework
[ https://issues.apache.org/jira/browse/HAWQ-917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15374323#comment-15374323 ] ASF GitHub Bot commented on HAWQ-917: - Github user paul-guo- commented on a diff in the pull request: https://github.com/apache/incubator-hawq/pull/787#discussion_r70563325 --- Diff: src/test/feature/type/ans/int8.ans --- @@ -175,131 +179,131 @@ SELECT '' AS to_char_4, to_char( (q1 * -1), 'S'), to_char( (q2 * SELECT '' AS to_char_5, to_char(q2, 'MI') FROM INT8_TBL ; to_char_5 | to_char ---+--- - | 123 | 456 | 4567890123456789 + | 123 | 4567890123456789 | -4567890123456789 (5 rows) SELECT '' AS to_char_6, to_char(q2, 'FMS')FROM INT8_TBL ; to_char_6 | to_char ---+--- - | +123 | +456 - | -4567890123456789 | +4567890123456789 + | +123 | +4567890123456789 + | -4567890123456789 (5 rows) SELECT '' AS to_char_7, to_char(q2, 'FMTHPR') FROM INT8_TBL ; to_char_7 | to_char ---+ - | 123RD - | <4567890123456789> + | 456TH | 4567890123456789TH + | 123RD | 4567890123456789TH - | 456TH + | <4567890123456789> (5 rows) SELECT '' AS to_char_8, to_char(q2, 'SGth') FROM INT8_TBL ; to_char_8 | to_char ---+- - | + 123rd - | -4567890123456789 + | + 456th | +4567890123456789th + | + 123rd | +4567890123456789th - | + 456th + | -4567890123456789 (5 rows) SELECT '' AS to_char_9, to_char(q2, '0999') FROM INT8_TBL ; to_char_9 | to_char ---+--- - | 0123 | 0456 | 4567890123456789 + | 0123 | 4567890123456789 | -4567890123456789 (5 rows) SELECT '' AS to_char_10, to_char(q2, 'S0999') FROM INT8_TBL ; to_char_10 | to_char +--- -| +0123 | +0456 -| -4567890123456789 | +4567890123456789 +| +0123 | +4567890123456789 +| -4567890123456789 (5 rows) SELECT '' AS to_char_11, to_char(q2, 'FM0999') FROM INT8_TBL ; to_char_11 | to_char +--- -| 0123 | 0456 | 4567890123456789 +| 0123 | 4567890123456789 | -4567890123456789 (5 rows) SELECT '' AS to_char_12, to_char(q2, 'FM.000') FROM INT8_TBL ; to_char_12 |to_char +--- -| 123.000 | 456.000 -| -4567890123456789.000 | 4567890123456789.000 +| 123.000 | 4567890123456789.000 +| -4567890123456789.000 (5 rows) SELECT '' AS to_char_13, to_char(q2, 'L.000') FROM INT8_TBL ; to_char_13 |to_char + -|123.000 -|456.000 -| 4567890123456789.000 -| 4567890123456789.000 -| -4567890123456789.000 +| $ 456.000 +| $ 4567890123456789.000 +| $ 123.000 +| $ 4567890123456789.000 +| $-4567890123456789.000 --- End diff -- I looked into this. I is related to currency info of the locale. You are right this probably need a bit more work. > Refactor feature tests for data type check with new googletest framework > > > Key: HAWQ-917 > URL: https://issues.apache.org/jira/browse/HAWQ-917 > Project: Apache HAWQ > Issue Type: Sub-task >Reporter: Paul Guo >
[jira] [Commented] (HAWQ-917) Refactor feature tests for data type check with new googletest framework
[ https://issues.apache.org/jira/browse/HAWQ-917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15374258#comment-15374258 ] ASF GitHub Bot commented on HAWQ-917: - Github user xunzhang commented on the issue: https://github.com/apache/incubator-hawq/pull/787 @paul-guo- , LGTM except above comments. Another comments is that according to the folders names defined by @yaoj2 , I suggest you to move your test cases into `catalog` folder instead of independent `type`. > Refactor feature tests for data type check with new googletest framework > > > Key: HAWQ-917 > URL: https://issues.apache.org/jira/browse/HAWQ-917 > Project: Apache HAWQ > Issue Type: Sub-task >Reporter: Paul Guo >Assignee: Paul Guo > > This needs to refactor the following 15 test cases. > ../../../regress/sql/boolean.sql > ../../../regress/sql/char.sql > ../../../regress/sql/date.sql > ../../../regress/sql/float4.sql > ../../../regress/sql/float8.sql > ../../../regress/sql/int2.sql > ../../../regress/sql/int4.sql > ../../../regress/sql/int8.sql > ../../../regress/sql/money.sql > ../../../regress/sql/name.sql > ../../../regress/sql/oid.sql > ../../../regress/sql/text.sql > ../../../regress/sql/time.sql > ../../../regress/sql/type_sanity.sql > ../../../regress/sql/varchar.sql -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HAWQ-917) Refactor feature tests for data type check with new googletest framework
[ https://issues.apache.org/jira/browse/HAWQ-917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15374211#comment-15374211 ] ASF GitHub Bot commented on HAWQ-917: - Github user paul-guo- commented on a diff in the pull request: https://github.com/apache/incubator-hawq/pull/787#discussion_r70556890 --- Diff: src/test/feature/type/TestType.cpp --- @@ -0,0 +1,77 @@ +#include "gtest/gtest.h" + +#include "lib/sql_util.h" + +using std::string; --- End diff -- It could compile without this. sql_util.h has included . Do we really need to include this? > Refactor feature tests for data type check with new googletest framework > > > Key: HAWQ-917 > URL: https://issues.apache.org/jira/browse/HAWQ-917 > Project: Apache HAWQ > Issue Type: Sub-task >Reporter: Paul Guo >Assignee: Paul Guo > > This needs to refactor the following 15 test cases. > ../../../regress/sql/boolean.sql > ../../../regress/sql/char.sql > ../../../regress/sql/date.sql > ../../../regress/sql/float4.sql > ../../../regress/sql/float8.sql > ../../../regress/sql/int2.sql > ../../../regress/sql/int4.sql > ../../../regress/sql/int8.sql > ../../../regress/sql/money.sql > ../../../regress/sql/name.sql > ../../../regress/sql/oid.sql > ../../../regress/sql/text.sql > ../../../regress/sql/time.sql > ../../../regress/sql/type_sanity.sql > ../../../regress/sql/varchar.sql -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HAWQ-917) Refactor feature tests for data type check with new googletest framework
[ https://issues.apache.org/jira/browse/HAWQ-917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15374203#comment-15374203 ] ASF GitHub Bot commented on HAWQ-917: - Github user xunzhang commented on a diff in the pull request: https://github.com/apache/incubator-hawq/pull/787#discussion_r70556665 --- Diff: src/test/feature/type/ans/int8.ans --- @@ -175,131 +179,131 @@ SELECT '' AS to_char_4, to_char( (q1 * -1), 'S'), to_char( (q2 * SELECT '' AS to_char_5, to_char(q2, 'MI') FROM INT8_TBL ; to_char_5 | to_char ---+--- - | 123 | 456 | 4567890123456789 + | 123 | 4567890123456789 | -4567890123456789 (5 rows) SELECT '' AS to_char_6, to_char(q2, 'FMS')FROM INT8_TBL ; to_char_6 | to_char ---+--- - | +123 | +456 - | -4567890123456789 | +4567890123456789 + | +123 | +4567890123456789 + | -4567890123456789 (5 rows) SELECT '' AS to_char_7, to_char(q2, 'FMTHPR') FROM INT8_TBL ; to_char_7 | to_char ---+ - | 123RD - | <4567890123456789> + | 456TH | 4567890123456789TH + | 123RD | 4567890123456789TH - | 456TH + | <4567890123456789> (5 rows) SELECT '' AS to_char_8, to_char(q2, 'SGth') FROM INT8_TBL ; to_char_8 | to_char ---+- - | + 123rd - | -4567890123456789 + | + 456th | +4567890123456789th + | + 123rd | +4567890123456789th - | + 456th + | -4567890123456789 (5 rows) SELECT '' AS to_char_9, to_char(q2, '0999') FROM INT8_TBL ; to_char_9 | to_char ---+--- - | 0123 | 0456 | 4567890123456789 + | 0123 | 4567890123456789 | -4567890123456789 (5 rows) SELECT '' AS to_char_10, to_char(q2, 'S0999') FROM INT8_TBL ; to_char_10 | to_char +--- -| +0123 | +0456 -| -4567890123456789 | +4567890123456789 +| +0123 | +4567890123456789 +| -4567890123456789 (5 rows) SELECT '' AS to_char_11, to_char(q2, 'FM0999') FROM INT8_TBL ; to_char_11 | to_char +--- -| 0123 | 0456 | 4567890123456789 +| 0123 | 4567890123456789 | -4567890123456789 (5 rows) SELECT '' AS to_char_12, to_char(q2, 'FM.000') FROM INT8_TBL ; to_char_12 |to_char +--- -| 123.000 | 456.000 -| -4567890123456789.000 | 4567890123456789.000 +| 123.000 | 4567890123456789.000 +| -4567890123456789.000 (5 rows) SELECT '' AS to_char_13, to_char(q2, 'L.000') FROM INT8_TBL ; to_char_13 |to_char + -|123.000 -|456.000 -| 4567890123456789.000 -| 4567890123456789.000 -| -4567890123456789.000 +| $ 456.000 +| $ 4567890123456789.000 +| $ 123.000 +| $ 4567890123456789.000 +| $-4567890123456789.000 --- End diff -- Why did you add `$` sign here? > Refactor feature tests for data type check with new googletest framework > > > Key: HAWQ-917 > URL: https://issues.apache.org/jira/browse/HAWQ-917 > Project: Apache HAWQ > Issue Type: Sub-task >Reporter: Paul Guo >Assignee: Paul Guo > > This needs to refactor the following 15 test cases. >
[jira] [Commented] (HAWQ-917) Refactor feature tests for data type check with new googletest framework
[ https://issues.apache.org/jira/browse/HAWQ-917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15374199#comment-15374199 ] ASF GitHub Bot commented on HAWQ-917: - Github user wengyanqing commented on the issue: https://github.com/apache/incubator-hawq/pull/787 LGTM > Refactor feature tests for data type check with new googletest framework > > > Key: HAWQ-917 > URL: https://issues.apache.org/jira/browse/HAWQ-917 > Project: Apache HAWQ > Issue Type: Sub-task >Reporter: Paul Guo >Assignee: Paul Guo > > This needs to refactor the following 15 test cases. > ../../../regress/sql/boolean.sql > ../../../regress/sql/char.sql > ../../../regress/sql/date.sql > ../../../regress/sql/float4.sql > ../../../regress/sql/float8.sql > ../../../regress/sql/int2.sql > ../../../regress/sql/int4.sql > ../../../regress/sql/int8.sql > ../../../regress/sql/money.sql > ../../../regress/sql/name.sql > ../../../regress/sql/oid.sql > ../../../regress/sql/text.sql > ../../../regress/sql/time.sql > ../../../regress/sql/type_sanity.sql > ../../../regress/sql/varchar.sql -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HAWQ-917) Refactor feature tests for data type check with new googletest framework
[ https://issues.apache.org/jira/browse/HAWQ-917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15372268#comment-15372268 ] ASF GitHub Bot commented on HAWQ-917: - GitHub user paul-guo- opened a pull request: https://github.com/apache/incubator-hawq/pull/787 HAWQ-917. Refactor feature tests for data type check with new googlet… …est framework You can merge this pull request into a Git repository by running: $ git pull https://github.com/paul-guo-/incubator-hawq test Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-hawq/pull/787.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #787 commit 1e62101c146511ee78c8d44a6c1ae0bf4a1def9a Author: Paul GuoDate: 2016-07-12T06:12:19Z HAWQ-917. Refactor feature tests for data type check with new googletest framework > Refactor feature tests for data type check with new googletest framework > > > Key: HAWQ-917 > URL: https://issues.apache.org/jira/browse/HAWQ-917 > Project: Apache HAWQ > Issue Type: Sub-task >Reporter: Paul Guo >Assignee: Paul Guo > > This needs to refactor the following 15 test cases. > ../../../regress/sql/boolean.sql > ../../../regress/sql/char.sql > ../../../regress/sql/date.sql > ../../../regress/sql/float4.sql > ../../../regress/sql/float8.sql > ../../../regress/sql/int2.sql > ../../../regress/sql/int4.sql > ../../../regress/sql/int8.sql > ../../../regress/sql/money.sql > ../../../regress/sql/name.sql > ../../../regress/sql/oid.sql > ../../../regress/sql/text.sql > ../../../regress/sql/time.sql > ../../../regress/sql/type_sanity.sql > ../../../regress/sql/varchar.sql -- This message was sent by Atlassian JIRA (v6.3.4#6332)