[GitHub] incubator-hawq issue #1014: HAWQ-858. Fix parser to understand case / when e...

2016-12-05 Thread huor
Github user huor commented on the issue:

https://github.com/apache/incubator-hawq/pull/1014
  
+1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq issue #1036: HAWQ-1188. Fix "-Wtautological-constant-out-of-r...

2016-12-05 Thread stanlyxiang
Github user stanlyxiang commented on the issue:

https://github.com/apache/incubator-hawq/pull/1036
  
+1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq issue #1038: HAWQ-1190. Fix "-Wtypedef-redefinition, -Wconsta...

2016-12-05 Thread stanlyxiang
Github user stanlyxiang commented on the issue:

https://github.com/apache/incubator-hawq/pull/1038
  
LGTM.  +1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq issue #1038: HAWQ-1190. Fix "-Wtypedef-redefinition, -Wconsta...

2016-12-05 Thread liming01
Github user liming01 commented on the issue:

https://github.com/apache/incubator-hawq/pull/1038
  
LGTM. +1.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Resolved] (HAWQ-1170) Crash at cleanup_allocation_algorithm() when enable '--enable-cassert' option

2016-12-05 Thread Xiang Sheng (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xiang Sheng resolved HAWQ-1170.
---
Resolution: Fixed

> Crash at cleanup_allocation_algorithm()  when enable '--enable-cassert' option
> --
>
> Key: HAWQ-1170
> URL: https://issues.apache.org/jira/browse/HAWQ-1170
> Project: Apache HAWQ
>  Issue Type: Bug
>  Components: Core
>Reporter: Xiang Sheng
>Assignee: Xiang Sheng
> Fix For: 2.0.1.0-incubating
>
> Attachments: config_file, create.sql, lineitem.tbl.small
>
>
> when add option '--enable-cassert' in hawq configure, hawq will crash when 
> run a test case of gpload. In the case, the default bucket num is 12 and the 
> expected virtual segment number is 24 when external table exists.  
> reproduce steps : 
> # hawq config -c default_hash_table_bucket_number -v 12 --skipvalidation
> # restart hawq
> # create table lineitem with the create.sql
> # update config_file, replace all $VAR with the correct value on your 
> environment.
> # gpload -f config_file 
> {color:red} THE LOG {color}.
> 2016-11-15 06:43:45.635469 PST,,,p177585,th0,,,2016-11-15 06:43:38 
> PST,0,con5182,cmd6,seg-1,"PANIC","XX000","Unexpected internal error: 
> Master process received signal SIGSEGV",,,0"10x9ce6f2 postgres 
>  (elog.c:4510)
> 20x9ce969 postgres StandardHandlerForSigillSigsegvSigbus_OnMainThread 
> (elog.c:4597)
> 30x8e1c36 postgres CdbProgramErrorHandler (postgres.c:3513)
> 40x3e4380f7e0 libpthread.so.0  (??:0)
> 50xb66a11 postgres calculate_planner_segment_num (cdbdatalocality.c:4431)
> 60x836555 postgres  (planner.c:667)
> 70x835d5e postgres planner (planner.c:475)
> 80x8dd67b postgres pg_plan_query (postgres.c:908)
> 90x8dd786 postgres pg_plan_queries (postgres.c:982)
> 10   0x8ded29 postgres  (postgres.c:1742)
> "
> 2016-11-15 06:44:26.162520 
> PST,,,p78695,th-11930232000,,,seg-1,"LOG","0","server process 
> (PID 177585) was terminated by signal 11: Segmentation 
> fault",,,0,,"postmaster.c",4748,
> 2016-11-15 06:44:26.162587 
> PST,,,p78695,th-11930232000,,,seg-1,"LOG","0","terminating 
> any other active server processes",,,0,,"postmaster.c",4486,
> {color:red} CORE DUMPED {color}
> (gdb) bt
> #0  0x003e4380f6ab in raise () from /lib64/libpthread.so.0
> #1  0x009ce73f in SafeHandlerForSegvBusIll (processName=0xd27713 
> "Master process", postgres_signal_arg=11) at elog.c:4519
> #2  0x009ce969 in StandardHandlerForSigillSigsegvSigbus_OnMainThread 
> (processName=0xd27713 "Master process", postgres_signal_arg=11) at elog.c:4597
> #3  0x008e1c36 in CdbProgramErrorHandler (postgres_signal_arg=11) at 
> postgres.c:3512
> #4  
> #5  0x00b65a16 in cleanup_allocation_algorithm 
> (context=0x7fffbd549cd0) at cdbdatalocality.c:3980
> #6  0x00b66a11 in calculate_planner_segment_num (query=0x307d5d0, 
> resourceLife=QRL_ONCE, fullRangeTable=0x2ff2480, intoPolicy=0x0, sliceNum=2,
> fixedVsegNum=-1) at cdbdatalocality.c:4430
> #7  0x00836555 in resource_negotiator (parse=0x307d708, 
> cursorOptions=0, boundParams=0x0, resourceLife=QRL_ONCE, 
> result=0x7fffbd54a018)
> at planner.c:667
> #8  0x00835d5e in planner (parse=0x307d708, cursorOptions=0, 
> boundParams=0x0, resourceLife=QRL_ONCE) at planner.c:473
> #9  0x008dd67b in pg_plan_query (querytree=0x307d708, 
> boundParams=0x0, resource_life=QRL_ONCE) at postgres.c:908
> #10 0x008dd786 in pg_plan_queries (querytrees=0x2ed7960, 
> boundParams=0x0, needSnapshot=0 '\000', resource_life=QRL_ONCE) at 
> postgres.c:982
> #11 0x008ded29 in exec_simple_query (
> query_string=0x2ed0898 "INSERT INTO public.\"lineitem\" 
> (\"l_orderkey\",\"l_partkey\",\"l_suppkey\",\"l_linenumber\",\"l_quantity\",\"l_extendedprice\",\"l_discount\",\"l_tax\",\"l_returnflag\",\"l_linestatus\",\"l_shipdate\",\"l_commitdate\",\"l_rece"...,
>  seqServerHost=0x0, seqServerPort=-1) at postgres.c:1742
> #12 0x008e3b44 in PostgresMain (argc=4, argv=0x2d38e60, 
> username=0x2d38de0 "gpadmin") at postgres.c:4840
> #13 0x0088d9eb in BackendRun (port=0x2d0a5f0) at postmaster.c:5915
> #14 0x0088ce0a in BackendStartup (port=0x2d0a5f0) at postmaster.c:5484
> #15 0x00886e86 in ServerLoop () at postmaster.c:2163
> #16 0x00885e93 in PostmasterMain (argc=9, argv=0x2d13010) at 
> postmaster.c:1454
> #17 0x007a3097 in main (argc=9, argv=0x2d13010) at main.c:226
> (gdb)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (HAWQ-77) Fix source code comment for new ALTER/CREATE RESOURCE QUEUE ddl statements

2016-12-05 Thread Xiang Sheng (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-77?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xiang Sheng resolved HAWQ-77.
-
Resolution: Fixed

> Fix source code comment for new ALTER/CREATE RESOURCE QUEUE ddl statements
> --
>
> Key: HAWQ-77
> URL: https://issues.apache.org/jira/browse/HAWQ-77
> Project: Apache HAWQ
>  Issue Type: Improvement
>  Components: Resource Manager
>Reporter: Yi Jin
>Assignee: Xiang Sheng
> Fix For: 2.0.1.0-incubating
>
>
> This is open to fix unresolved comments from HAWQ-25.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (HAWQ-1160) hawq checkperf does not handle hostfile correctly

2016-12-05 Thread Xiang Sheng (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-1160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xiang Sheng resolved HAWQ-1160.
---
Resolution: Fixed

> hawq checkperf does not handle hostfile correctly
> -
>
> Key: HAWQ-1160
> URL: https://issues.apache.org/jira/browse/HAWQ-1160
> Project: Apache HAWQ
>  Issue Type: Bug
>  Components: Command Line Tools
>Reporter: Xiang Sheng
>Assignee: Xiang Sheng
> Fix For: 2.0.1.0-incubating
>
>
>  gpcheckperf -f hostfile_hawq -d /data1 -d /data2  -r d -D -v > 
> check_disk_mem.log 2>&1 & 
> There is not hostfile_hawq.  The command should be failed with error 
> information that hostfile_hawq does not exist. 
> While it error out with 
> [Info] sh -c 'cat /proc/meminfo | grep MemTotal'
> MemTotal:   65881368 kB
> /data1/pulse-agent-data/HAWQ-main-SystemTest-yarn/product/hawq/./bin/gpcheckperf
>  -f hostfile_hawq -d /data1 -d /data2 -r d -D -v
> 
>   SETUP
> 
> [Info] verify python interpreter exists
> [Info] 
> /data1/pulse-agent-data/HAWQ-main-SystemTest-yarn/product/hawq/./bin/gpssh -f 
> hostfile_hawq 'python -c print'
> 
>   TEARDOWN
> 
> [Info] 
> /data1/pulse-agent-data/HAWQ-main-SystemTest-yarn/product/hawq/./bin/gpssh -f 
> hostfile_hawq 'rm -rf  /data1/gpcheckperf_$USER /data2/gpcheckperf_$USER'
> [Error] unable to find python interpreter on some hosts
> verify PATH variables on the hosts



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] incubator-hawq pull request #1025: HAWQ-1170. Crash at cleanup_allocation_al...

2016-12-05 Thread stanlyxiang
Github user stanlyxiang closed the pull request at:

https://github.com/apache/incubator-hawq/pull/1025


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request #1023: HAWQ-77. Fix source code comment for new ...

2016-12-05 Thread stanlyxiang
Github user stanlyxiang closed the pull request at:

https://github.com/apache/incubator-hawq/pull/1023


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq issue #1025: HAWQ-1170. Crash at cleanup_allocation_algorithm...

2016-12-05 Thread stanlyxiang
Github user stanlyxiang commented on the issue:

https://github.com/apache/incubator-hawq/pull/1025
  
Merged into master.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq issue #1023: HAWQ-77. Fix source code comment for new ALTER/C...

2016-12-05 Thread stanlyxiang
Github user stanlyxiang commented on the issue:

https://github.com/apache/incubator-hawq/pull/1023
  
Merged into master.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request #1016: HAWQ-1160. Hawq checkperf does not handle...

2016-12-05 Thread stanlyxiang
Github user stanlyxiang closed the pull request at:

https://github.com/apache/incubator-hawq/pull/1016


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request #1016: HAWQ-1160. Hawq checkperf does not handle...

2016-12-05 Thread stanlyxiang
Github user stanlyxiang closed the pull request at:

https://github.com/apache/incubator-hawq/pull/1016


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request #1016: HAWQ-1160. Hawq checkperf does not handle...

2016-12-05 Thread stanlyxiang
GitHub user stanlyxiang reopened a pull request:

https://github.com/apache/incubator-hawq/pull/1016

HAWQ-1160. Hawq checkperf does not handle hostfile correctly

@radarwave   @xunzhang  please help to review the fix. Thanks.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/stanlyxiang/incubator-hawq gpcheckperf

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-hawq/pull/1016.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 #1016


commit b6128c7501568050e8fdb591d3cc7eb78f6925e4
Author: stanlyxiang 
Date:   2016-11-16T07:54:59Z

HAWQ-1160. Hawq checkperf does not handle hostfile correctly




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq issue #1016: HAWQ-1160. Hawq checkperf does not handle hostfi...

2016-12-05 Thread stanlyxiang
Github user stanlyxiang commented on the issue:

https://github.com/apache/incubator-hawq/pull/1016
  
merged into master


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq issue #1023: HAWQ-77. Fix source code comment for new ALTER/C...

2016-12-05 Thread wengyanqing
Github user wengyanqing commented on the issue:

https://github.com/apache/incubator-hawq/pull/1023
  
LGTM


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Updated] (HAWQ-1192) document heap size and thread config setting recommendations for PXF

2016-12-05 Thread Lisa Owen (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-1192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lisa Owen updated HAWQ-1192:

Priority: Minor  (was: Major)

> document heap size and thread config setting recommendations for PXF
> 
>
> Key: HAWQ-1192
> URL: https://issues.apache.org/jira/browse/HAWQ-1192
> Project: Apache HAWQ
>  Issue Type: Improvement
>  Components: Documentation
>Affects Versions: 2.0.0.0-incubating, 2.0.1.0-incubating
>Reporter: Lisa Owen
>Assignee: David Yozie
>Priority: Minor
>
> queries may hang or fail with Out of Memory Exception (OOM) in cases where 
> there are many concurrent requests and/or large file size.  document specific 
> tomcat and PXF configuration setting recommendations to alleviate the issue.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HAWQ-1192) document heap size and thread config setting recommendations for PXF

2016-12-05 Thread Lisa Owen (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-1192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lisa Owen updated HAWQ-1192:

Affects Version/s: 2.0.1.0-incubating
   2.0.0.0-incubating

> document heap size and thread config setting recommendations for PXF
> 
>
> Key: HAWQ-1192
> URL: https://issues.apache.org/jira/browse/HAWQ-1192
> Project: Apache HAWQ
>  Issue Type: Improvement
>  Components: Documentation
>Affects Versions: 2.0.0.0-incubating, 2.0.1.0-incubating
>Reporter: Lisa Owen
>Assignee: David Yozie
>Priority: Minor
>
> queries may hang or fail with Out of Memory Exception (OOM) in cases where 
> there are many concurrent requests and/or large file size.  document specific 
> tomcat and PXF configuration setting recommendations to alleviate the issue.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (HAWQ-1192) document heap size and thread config setting recommendations for PXF

2016-12-05 Thread Lisa Owen (JIRA)
Lisa Owen created HAWQ-1192:
---

 Summary: document heap size and thread config setting 
recommendations for PXF
 Key: HAWQ-1192
 URL: https://issues.apache.org/jira/browse/HAWQ-1192
 Project: Apache HAWQ
  Issue Type: Improvement
  Components: Documentation
Reporter: Lisa Owen
Assignee: David Yozie


queries may hang or fail with Out of Memory Exception (OOM) in cases where 
there are many concurrent requests and/or large file size.  document specific 
tomcat and PXF configuration setting recommendations to alleviate the issue.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HAWQ-1191) Get rid of DELIMITER property for HiveORC profile

2016-12-05 Thread Oleksandr Diachenko (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-1191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Oleksandr Diachenko updated HAWQ-1191:
--
Fix Version/s: 2.0.1.0-incubating

> Get rid of DELIMITER property for HiveORC profile
> -
>
> Key: HAWQ-1191
> URL: https://issues.apache.org/jira/browse/HAWQ-1191
> Project: Apache HAWQ
>  Issue Type: Improvement
>  Components: PXF
>Reporter: Oleksandr Diachenko
>Assignee: Lei Chang
> Fix For: 2.0.1.0-incubating
>
>
> As for now DELIMITER property is required when creating HiveORC profile table 
> but it should not be, because it's not being used.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Assigned] (HAWQ-1191) Get rid of DELIMITER property for HiveORC profile

2016-12-05 Thread Oleksandr Diachenko (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-1191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Oleksandr Diachenko reassigned HAWQ-1191:
-

Assignee: Oleksandr Diachenko  (was: Lei Chang)

> Get rid of DELIMITER property for HiveORC profile
> -
>
> Key: HAWQ-1191
> URL: https://issues.apache.org/jira/browse/HAWQ-1191
> Project: Apache HAWQ
>  Issue Type: Improvement
>  Components: PXF
>Reporter: Oleksandr Diachenko
>Assignee: Oleksandr Diachenko
> Fix For: 2.0.1.0-incubating
>
>
> As for now DELIMITER property is required when creating HiveORC profile table 
> but it should not be, because it's not being used.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] incubator-hawq pull request #1039: HAWQ-1191. Decomissioned DELIMITER from H...

2016-12-05 Thread sansanichfb
GitHub user sansanichfb opened a pull request:

https://github.com/apache/incubator-hawq/pull/1039

HAWQ-1191. Decomissioned DELIMITER from HiveOrc profile.



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/sansanichfb/incubator-hawq HAWQ-1191

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-hawq/pull/1039.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 #1039


commit 98690c519ade2e909357b6c88ccc8ce4452e2ec1
Author: Oleksandr Diachenko 
Date:   2016-12-05T21:41:34Z

HAWQ-1191. Decomissioned DELIMITER from HiveOrc profile.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Created] (HAWQ-1191) Get rid of DELIMITER property for HiveORC profile

2016-12-05 Thread Oleksandr Diachenko (JIRA)
Oleksandr Diachenko created HAWQ-1191:
-

 Summary: Get rid of DELIMITER property for HiveORC profile
 Key: HAWQ-1191
 URL: https://issues.apache.org/jira/browse/HAWQ-1191
 Project: Apache HAWQ
  Issue Type: Improvement
  Components: PXF
Reporter: Oleksandr Diachenko
Assignee: Lei Chang


As for now DELIMITER property is required when creating HiveORC profile table 
but it should not be, because it's not being used.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HAWQ-1181) Improve the code quality of Apache HAWQ.

2016-12-05 Thread Jane Beckman (JIRA)

[ 
https://issues.apache.org/jira/browse/HAWQ-1181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15722975#comment-15722975
 ] 

Jane Beckman commented on HAWQ-1181:


There are places in Documentation where replacing the "greenplum" string with 
"hawq" will have impact. Data Docs will need to need to be kept in the loop on 
this.

> Improve the code quality of Apache HAWQ.
> 
>
> Key: HAWQ-1181
> URL: https://issues.apache.org/jira/browse/HAWQ-1181
> Project: Apache HAWQ
>  Issue Type: New Feature
>  Components: Build
>Reporter: hongwu
>Assignee: Lei Chang
>
> There are several aspects to improve the code quality of Apache HAWQ. All 
> these aspects may relate to some code factors, bug fix, modularization... 
> This is super helpful to the future development of HAWQ project. I try to 
> list some of the aspects in my mind, we can create sub-tasks for these 
> further:
> 1. Fix compiling warnings.
> 2. Improve code coverage rate.
> 3. Fix static check defects(such as clang-check and coverity).
> 4. Refactor HAWQ with separate modules to help developers write painless unit 
> tests, to help integrate new features from upstream Postgres.
> 5. HAWQ Code style unification and fix, improve CI and pull requests 
> reviewing process to check this.
> 6. Decapitate Autotool and rewrite building system using CMake or other 
> libraries.
> 7. Replace `greenplum` string with `hawq`.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] incubator-hawq issue #1038: HAWQ-1190. Fix "-Wtypedef-redefinition, -Wconsta...

2016-12-05 Thread xunzhang
Github user xunzhang commented on the issue:

https://github.com/apache/incubator-hawq/pull/1038
  
also cc @liming01 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq issue #1038: HAWQ-1190. Fix "-Wtypedef-redefinition, -Wconsta...

2016-12-05 Thread xunzhang
Github user xunzhang commented on the issue:

https://github.com/apache/incubator-hawq/pull/1038
  
cc @paul-guo- @ictmalili @stanlyxiang 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request #1038: HAWQ-1190. Fix "-Wtypedef-redefinition, -...

2016-12-05 Thread xunzhang
GitHub user xunzhang opened a pull request:

https://github.com/apache/incubator-hawq/pull/1038

HAWQ-1190. Fix "-Wtypedef-redefinition, -Wconstant-logical-operand, 
-Wmemsize-comparison, -Wnull-dereference, -Wpointer-sign, -Wint-conversion" 
warning types.



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/xunzhang/incubator-hawq HAWQ-1190

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-hawq/pull/1038.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 #1038


commit 1313a2e67e33a9817a5226ef190a6b4c143fb278
Author: xunzhang 
Date:   2016-12-05T16:51:33Z

HAWQ-1190. Fix "-Wtypedef-redefinition, -Wconstant-logical-operand, 
-Wmemsize-comparison, -Wnull-dereference, -Wpointer-sign, -Wint-conversion" 
warning types.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Updated] (HAWQ-1190) Fix "Wimplicit-function-declaration, Wgnu-variable-sized-type-not-at-end, Wtypedef-redefinition, Wconstant-logical-operand, Wmemsize-comparison, Wnull-dereference, Wpointe

2016-12-05 Thread hongwu (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-1190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

hongwu updated HAWQ-1190:
-
Description: 
{code}
gcc -O3 -std=gnu99  -Wall -Wmissing-prototypes -Wpointer-arith  -Wendif-labels 
-Wformat-security -fno-strict-aliasing -fwrapv 
-I/usr/local/Cellar/curl/7.49.1/include 
-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/libxml2
 -lcurl  -I. -I../../../src/include  
-I/Users/wuhong/Desktop/tmp/tmp2/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include
 
-I/Users/wuhong/Desktop/tmp/tmp2/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include
  -c -o pxf.o pxf.c
clang: warning: -lcurl: 'linker' input unused
In file included from pxf.c:21:
In file included from ./common.h:31:
../../../src/include/access/fileam.h:75:33: warning: redefinition of typedef 
'ExternalSelectDesc' is a C11 feature [-Wtypedef-redefinition]
typedef ExternalSelectDescData *ExternalSelectDesc;
^
../../../src/include/access/extprotocol.h:37:40: note: previous definition is 
here
typedef struct ExternalSelectDescData *ExternalSelectDesc;
   ^
1 warning generated.

gcc -O3 -std=gnu99  -Wall -Wmissing-prototypes -Wpointer-arith  -Wendif-labels 
-Wformat-security -fno-strict-aliasing -fwrapv 
-I/usr/local/Cellar/curl/7.49.1/include 
-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/libxml2
 -I../../../../src/backend/gp_libpq_fe  -I../../../../src/include  
-I/Users/wuhong/Desktop/tmp/tmp2/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include
 
-I/Users/wuhong/Desktop/tmp/tmp2/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include
  -c -o datetime.o datetime.c
datetime.c:3205:27: warning: use of logical '||' with constant operand 
[-Wconstant-logical-operand]
tmask = (DTK_DATE_M || 
DTK_TIME_M);
^  
~~
datetime.c:3205:27: note: use '|' for a bitwise operation
tmask = (DTK_DATE_M || 
DTK_TIME_M);
^~
|
1 warning generated.

segadmin.c:112:13: warning: use of logical '&&' with constant operand 
[-Wconstant-logical-operand]
if ((flags && STANDBY_ONLY) == STANDBY_ONLY)
   ^  
segadmin.c:112:13: note: use '&' for a bitwise operation
if ((flags && STANDBY_ONLY) == STANDBY_ONLY)
   ^~
   &

gcc -O3 -std=gnu99  -Wall -Wmissing-prototypes -Wpointer-arith  -Wendif-labels 
-Wformat-security -fno-strict-aliasing -fwrapv 
-I/usr/local/Cellar/curl/7.49.1/include 
-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/libxml2
 -pthread  -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS  -DFRONTEND 
-I../include -I../../../../src/interfaces/ecpg/include 
-I../../../../src/include/utils -I../../../../src/interfaces/libpq 
-I../../../../src/include  
-I/Users/wuhong/Desktop/tmp/tmp2/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include
 
-I/Users/wuhong/Desktop/tmp/tmp2/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include
 -DSO_MAJOR_VERSION=3  -c -o interval.o interval.c
interval.c:609:27: warning: use of logical '||' with constant operand 
[-Wconstant-logical-operand]
tmask = (DTK_DATE_M || 
DTK_TIME_M);
^  
~~
interval.c:609:27: note: use '|' for a bitwise operation
tmask = (DTK_DATE_M || 
DTK_TIME_M);
^~
|
1 warning generated.

gcc -O3 -std=gnu99  -Wall -Wmissing-prototypes -Wpointer-arith  -Wendif-labels 
-Wformat-security -fno-strict-aliasing -fwrapv 
-I/usr/local/Cellar/curl/7.49.1/include 
-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/libxml2
 -I../../../../src/backend/gp_libpq_fe  -I../../../../src/include  
-I/Users/wuhong/Desktop/tmp/tmp2/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include
 
-I/Users/wuhong/Desktop/tmp/tmp2/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include
  -c -o pgstatfuncs.o pgstatfuncs.c
pgstatfuncs.c:464:33: warning: size argument in 'memcmp' call is a comparison 
[-Wmemsize-comparison]
   sizeof(zero_clientaddr) == 0))
   

[jira] [Updated] (HAWQ-1190) Fix "Wimplicit-function-declaration, Wgnu-variable-sized-type-not-at-end, Wtypedef-redefinition, Wconstant-logical-operand, Wmemsize-comparison, Wnull-dereference, Wpointe

2016-12-05 Thread hongwu (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-1190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

hongwu updated HAWQ-1190:
-
Summary: Fix "Wimplicit-function-declaration, 
Wgnu-variable-sized-type-not-at-end, Wtypedef-redefinition, 
Wconstant-logical-operand, Wmemsize-comparison, Wnull-dereference, 
Wpointer-sign, Wint-conversion" compile warnings.  (was: Fix 
"Wimplicit-function-declaration, Wgnu-variable-sized-type-not-at-end, 
Wtypedef-redefinition, Wincompatible-pointer-types, Wconstant-logical-operand, 
Wmemsize-comparison, Wnull-dereference, Wpointer-sign, Wint-conversion" compile 
warnings.)

> Fix "Wimplicit-function-declaration, Wgnu-variable-sized-type-not-at-end, 
> Wtypedef-redefinition, Wconstant-logical-operand, Wmemsize-comparison, 
> Wnull-dereference, Wpointer-sign, Wint-conversion" compile warnings.
> -
>
> Key: HAWQ-1190
> URL: https://issues.apache.org/jira/browse/HAWQ-1190
> Project: Apache HAWQ
>  Issue Type: Sub-task
>  Components: Build
>Reporter: hongwu
>Assignee: hongwu
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Assigned] (HAWQ-1190) Fix "Wimplicit-function-declaration, Wgnu-variable-sized-type-not-at-end, Wtypedef-redefinition, Wincompatible-pointer-types, Wconstant-logical-operand, Wmemsize-comparis

2016-12-05 Thread hongwu (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-1190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

hongwu reassigned HAWQ-1190:


Assignee: hongwu  (was: Lei Chang)

> Fix "Wimplicit-function-declaration, Wgnu-variable-sized-type-not-at-end, 
> Wtypedef-redefinition, Wincompatible-pointer-types, 
> Wconstant-logical-operand, Wmemsize-comparison, Wnull-dereference, 
> Wpointer-sign, Wint-conversion" compile warnings.
> --
>
> Key: HAWQ-1190
> URL: https://issues.apache.org/jira/browse/HAWQ-1190
> Project: Apache HAWQ
>  Issue Type: Sub-task
>  Components: Build
>Reporter: hongwu
>Assignee: hongwu
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (HAWQ-1190) Fix "Wimplicit-function-declaration, Wgnu-variable-sized-type-not-at-end, Wtypedef-redefinition, Wincompatible-pointer-types, Wconstant-logical-operand, Wmemsize-compariso

2016-12-05 Thread hongwu (JIRA)
hongwu created HAWQ-1190:


 Summary: Fix "Wimplicit-function-declaration, 
Wgnu-variable-sized-type-not-at-end, Wtypedef-redefinition, 
Wincompatible-pointer-types, Wconstant-logical-operand, Wmemsize-comparison, 
Wnull-dereference, Wpointer-sign, Wint-conversion" compile warnings.
 Key: HAWQ-1190
 URL: https://issues.apache.org/jira/browse/HAWQ-1190
 Project: Apache HAWQ
  Issue Type: Sub-task
  Components: Build
Reporter: hongwu
Assignee: Lei Chang






--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HAWQ-1181) Improve the code quality of Apache HAWQ.

2016-12-05 Thread hongwu (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-1181?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

hongwu updated HAWQ-1181:
-
Description: 
There are several aspects to improve the code quality of Apache HAWQ. All these 
aspects may relate to some code factors, bug fix, modularization... This is 
super helpful to the future development of HAWQ project. I try to list some of 
the aspects in my mind, we can create sub-tasks for these further:

1. Fix compiling warnings.
2. Improve code coverage rate.
3. Fix static check defects(such as clang-check and coverity).
4. Refactor HAWQ with separate modules to help developers write painless unit 
tests, to help integrate new features from upstream Postgres.
5. HAWQ Code style unification and fix, improve CI and pull requests reviewing 
process to check this.
6. Decapitate Autotool and rewrite building system using CMake or other 
libraries.
7. Replace `greenplum` string with `hawq`.

  was:
There are several aspects to improve the code quality of Apache HAWQ. All these 
aspects may relate to some code factors, bug fix, modularization... This is 
super helpful to the future development of HAWQ project. I try to list some of 
the aspects in my mind, we can create sub-tasks for these further:

1. Fix compiling warnings.
2. Improve code coverage rate.
3. Fix static check defects(such as clang-check and coverity).
4. Refactor HAWQ with separate modules to help developers write painless unit 
tests, to help integrate new features from upstream Postgres.
5. HAWQ Code style unification and fix, improve CI and pull requests reviewing 
process to check this.
6. Decapitate Autotool and rewrite building system using CMake or other 
libraries.


> Improve the code quality of Apache HAWQ.
> 
>
> Key: HAWQ-1181
> URL: https://issues.apache.org/jira/browse/HAWQ-1181
> Project: Apache HAWQ
>  Issue Type: New Feature
>  Components: Build
>Reporter: hongwu
>Assignee: Lei Chang
>
> There are several aspects to improve the code quality of Apache HAWQ. All 
> these aspects may relate to some code factors, bug fix, modularization... 
> This is super helpful to the future development of HAWQ project. I try to 
> list some of the aspects in my mind, we can create sub-tasks for these 
> further:
> 1. Fix compiling warnings.
> 2. Improve code coverage rate.
> 3. Fix static check defects(such as clang-check and coverity).
> 4. Refactor HAWQ with separate modules to help developers write painless unit 
> tests, to help integrate new features from upstream Postgres.
> 5. HAWQ Code style unification and fix, improve CI and pull requests 
> reviewing process to check this.
> 6. Decapitate Autotool and rewrite building system using CMake or other 
> libraries.
> 7. Replace `greenplum` string with `hawq`.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] incubator-hawq issue #1036: HAWQ-1188. Fix "-Wtautological-constant-out-of-r...

2016-12-05 Thread xunzhang
Github user xunzhang commented on the issue:

https://github.com/apache/incubator-hawq/pull/1036
  
To conclude, I think there needs no modification according to @paul-guo- 's 
review. Please check out my replies and review this pull request again 
@paul-guo- . Thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request #1036: HAWQ-1188. Fix "-Wtautological-constant-o...

2016-12-05 Thread xunzhang
Github user xunzhang commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/1036#discussion_r90880247
  
--- Diff: src/backend/resourcemanager/include/utils/simplestring.h ---
@@ -63,7 +63,7 @@ bool SimpleStringEmpty(SimpStringPtr str);
 int  SimpleStringLocateChar(SimpStringPtr str, char target, int *location);
 /* string to the other number values. */
 int  SimpleStringToInt32(SimpStringPtr str, int32_t *value);
-int  SimpleStringToInt64(SimpStringPtr str, int64_t *value);
+int  SimpleStringToInt64(SimpStringPtr str, int64 *value);
--- End diff --

Because the definition of `int64` is `long int` while the definition of 
`int64_t` is `long long int`. Besides, the caller of this function is a 
`HostnameVolumeInfo` object which is definited as a `int64`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request #1036: HAWQ-1188. Fix "-Wtautological-constant-o...

2016-12-05 Thread xunzhang
Github user xunzhang commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/1036#discussion_r90876775
  
--- Diff: src/backend/gp_libpq_fe/fe-connect.c ---
@@ -436,7 +436,7 @@ PQconnectStartParams(const char **keywords,
{
conn->status = CONNECTION_BAD;
/* errorMessage is already set */
-   return false;
+   return conn;
--- End diff --

I found gpdb has already fixed this line of code: 
https://github.com/xunzhang/incubator-hawq/blob/47361ae71f8c90930c68985245aeef669437574b/src/interfaces/libpq/fe-connect.c#L449.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request #1036: HAWQ-1188. Fix "-Wtautological-constant-o...

2016-12-05 Thread xunzhang
Github user xunzhang commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/1036#discussion_r90877631
  
--- Diff: src/backend/gp_libpq_fe/fe-exec.c ---
@@ -2992,7 +2992,6 @@ PQoidValue(const PGresult *res)
unsigned long result;
 
if (!res ||
--- End diff --

Ditto


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request #1036: HAWQ-1188. Fix "-Wtautological-constant-o...

2016-12-05 Thread xunzhang
Github user xunzhang commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/1036#discussion_r90877708
  
--- Diff: src/interfaces/libpq/fe-exec.c ---
@@ -2386,7 +2386,7 @@ PQresultStatus(const PGresult *res)
 char *
 PQresStatus(ExecStatusType status)
 {
-   if (status < 0 || status >= sizeof pgresStatus / sizeof pgresStatus[0])
+   if (status < PGRES_EMPTY_QUERY || (unsigned int) status >= sizeof 
pgresStatus / sizeof pgresStatus[0])
--- End diff --

Ditto


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request #1036: HAWQ-1188. Fix "-Wtautological-constant-o...

2016-12-05 Thread xunzhang
Github user xunzhang commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/1036#discussion_r90877683
  
--- Diff: src/interfaces/libpq/fe-connect.c ---
@@ -446,7 +446,7 @@ PQconnectStartParams(const char **keywords,
{
conn->status = CONNECTION_BAD;
/* errorMessage is already set */
-   return false;
+   return conn;
--- End diff --

Ditto


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request #1036: HAWQ-1188. Fix "-Wtautological-constant-o...

2016-12-05 Thread xunzhang
Github user xunzhang commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/1036#discussion_r90877543
  
--- Diff: src/backend/gp_libpq_fe/fe-exec.c ---
@@ -2968,7 +2968,7 @@ PQoidStatus(const PGresult *res)
 
size_t  len;
 
-   if (!res || !res->cmdStatus || strncmp(res->cmdStatus, "INSERT ", 7) != 
0)
+   if (!res || strncmp(res->cmdStatus, "INSERT ", 7) != 0)
--- End diff --

`res->cmdStatus` can not be NULL if `res` is not NULL. Please check out the 
definition of `PGresult`, it is a stack memory bundled with `res` variable.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request #1036: HAWQ-1188. Fix "-Wtautological-constant-o...

2016-12-05 Thread xunzhang
Github user xunzhang commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/1036#discussion_r90877094
  
--- Diff: src/backend/gp_libpq_fe/fe-exec.c ---
@@ -2668,7 +2668,7 @@ PQresultStatus(const PGresult *res)
 char *
 PQresStatus(ExecStatusType status)
 {
-   if ((int)status < 0 || status >= sizeof pgresStatus / sizeof 
pgresStatus[0])
+   if (status < PGRES_EMPTY_QUERY || (unsigned int) status >= sizeof 
pgresStatus / sizeof pgresStatus[0])
--- End diff --

Here, `PGRES_EMPTY_QUERY` is a lower guard enum value, so `status < 
PGRES_EMPTY_QUERY` is ok.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request #1036: HAWQ-1188. Fix "-Wtautological-constant-o...

2016-12-05 Thread xunzhang
Github user xunzhang commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/1036#discussion_r90876168
  
--- Diff: src/backend/cdb/cdbsreh.c ---
@@ -347,11 +347,8 @@ void InsertIntoErrorTable(CdbSreh *cdbsreh)
}

/* file name */
-   if(cdbsreh->filename)
-   {
-   values[errtable_filename - 1] = DirectFunctionCall1(textin, 
CStringGetDatum(cdbsreh->filename));
-   nulls[errtable_filename - 1] = false;
-   }
+   values[errtable_filename - 1] = DirectFunctionCall1(textin, 
CStringGetDatum(cdbsreh->filename));
+   nulls[errtable_filename - 1] = false;
 
--- End diff --

Because if `cdbsreh` is created, `cdbsreh->filename` should be also not 
NULL. In other words, this check is meaningless. Please check out the 
definition of `CdbSreh`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request #1036: HAWQ-1188. Fix "-Wtautological-constant-o...

2016-12-05 Thread xunzhang
Github user xunzhang commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/1036#discussion_r90875684
  
--- Diff: src/backend/cdb/cdbgang.c ---
@@ -444,7 +444,7 @@ disconnectAndDestroyGang(Gang *gp)
elog(DEBUG2, "Warning: disconnectAndDestroyGang called on an %s 
gang",
 gp->active ? "active" : "allocated");
 
-   if (gp->gang_id < 1 || gp->gang_id > 1 || gp->type > 10 || 
gp->size > 10)
+   if (gp->gang_id < 1 || gp->gang_id > 1 || gp->type > 
GANGTYPE_PRIMARY_WRITER || gp->size > 10)
--- End diff --

check >10 is meaningless. We can also add `GANGTYPE_MAX` then check with 
`gp->type >= GANGTYPE_MAX`. Also, we can check with `gp-type < GANGTYPE_MAX`. 
All of these are equivalent.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request #1035: HAWQ-1187. Fix "-Wsometimes-uninitialized...

2016-12-05 Thread xunzhang
Github user xunzhang closed the pull request at:

https://github.com/apache/incubator-hawq/pull/1035


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Resolved] (HAWQ-1187) Fix "-Wsometimes-uninitialized, -Wsizeof-pointer-memaccess, -Wdangling-else, -Wheader-guard, -Wenum-conversion, -Winvalid-source-encoding" compile warnings under osx

2016-12-05 Thread hongwu (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-1187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

hongwu resolved HAWQ-1187.
--
   Resolution: Fixed
Fix Version/s: 2.0.1.0-incubating

> Fix "-Wsometimes-uninitialized, -Wsizeof-pointer-memaccess, -Wdangling-else, 
> -Wheader-guard, -Wenum-conversion, -Winvalid-source-encoding" compile 
> warnings under osx
> -
>
> Key: HAWQ-1187
> URL: https://issues.apache.org/jira/browse/HAWQ-1187
> Project: Apache HAWQ
>  Issue Type: Sub-task
>  Components: Build
>Reporter: hongwu
>Assignee: hongwu
> Fix For: 2.0.1.0-incubating
>
>
> http://pastebin.com/VWSuCwsC
> {code}
> aosegfiles.c:1105:6: warning: variable 'returnDatum' is used uninitialized 
> whenever 'if' condition is false [-Wsometimes-uninitialized]
> if (RelationIsAoRows(parentrel))
> ^~~
> ../../../../src/include/utils/rel.h:364:2: note: expanded from macro 
> 'RelationIsAoRows'
> ((bool)(((relation)->rd_rel->relstorage == RELSTORAGE_AOROWS)))
> ^~~
> aosegfiles.c:1112:9: note: uninitialized use occurs here
> return returnDatum;
>^~~
> aosegfiles.c:1105:2: note: remove the 'if' if its condition is always true
> if (RelationIsAoRows(parentrel))
> ^~~~
> aosegfiles.c:1094:21: note: initialize the variable 'returnDatum' to silence 
> this warning
> Datum   returnDatum;
>^
> = 0
> tablecmds.c:902:7: warning: variable 'result' is used uninitialized whenever 
> 'if' condition is false [-Wsometimes-uninitialized]
> if (astate)
> ^~
> tablecmds.c:905:10: note: uninitialized use occurs here
> return result;
>^~
> tablecmds.c:902:3: note: remove the 'if' if its condition is always true
> if (astate)
> ^~~
> tablecmds.c:803:14: note: initialize the variable 'result' to silence this 
> warning
> Datum result;
> ^
>  = 0
> tablecmds.c:4740:15: warning: variable 'l1' is used uninitialized whenever 
> 'if' condition is false [-Wsometimes-uninitialized]
> else if (!is_at)
>  ^~
> tablecmds.c:4750:23: note: uninitialized use occurs here
> if (IsA(linitial(l1), A_Const) ||
>  ^~
> ../../../src/include/nodes/pg_list.h:124:41: note: expanded from macro 
> 'linitial'
> #define linitial(l) lfirst(list_head(l))
>  ^
> ../../../src/include/nodes/pg_list.h:120:25: note: expanded from macro 
> 'lfirst'
> #define lfirst(lc)  ((lc)->data.ptr_value)
>   ^~
> ../../../src/include/nodes/nodes.h:595:39: note: expanded from macro 'IsA'
> #define IsA(nodeptr,_type_) (nodeTag(nodeptr) == T_##_type_)
>  ^~~
> ../../../src/include/nodes/nodes.h:549:37: note: expanded from macro 'nodeTag'
> #define nodeTag(nodeptr)(((Node*)(nodeptr))->type)
>   ^~~
> tablecmds.c:4740:11: note: remove the 'if' if its condition is always true
> else if (!is_at)
>  ^~~
> tablecmds.c:4729:14: note: initialize the variable 'l1' to silence this 
> warning
> List *l1;
> ^
>  = NULL
> setrefs.c:1465:7: warning: variable 'bitmapqualorig_p' is used uninitialized 
> whenever 'if' condition is false [-Wsometimes-uninitialized]
> if (IsA(inner_plan, BitmapHeapScan))
> ^~~
> ../../../../src/include/nodes/nodes.h:595:30: note: expanded from macro 'IsA'
> #define IsA(nodeptr,_type_) (nodeTag(nodeptr) == T_##_type_)
> ^~~~
> setrefs.c:1473:28: note: uninitialized use occurs here
> if (NumRelids((Node *) (*bitmapqualorig_p)) > 1)
>  ^~~~
> setrefs.c:1465:3: note: remove the 'if' if its

[GitHub] incubator-hawq issue #1035: HAWQ-1187. Fix "-Wsometimes-uninitialized, -Wsiz...

2016-12-05 Thread xunzhang
Github user xunzhang commented on the issue:

https://github.com/apache/incubator-hawq/pull/1035
  
Merged into master.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---