[jira] [Resolved] (HAWQ-1274) Add rat check in Travis CI

2017-01-19 Thread hongwu (JIRA)

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

hongwu resolved HAWQ-1274.
--
Resolution: Fixed

> Add rat check in Travis CI
> --
>
> Key: HAWQ-1274
> URL: https://issues.apache.org/jira/browse/HAWQ-1274
> Project: Apache HAWQ
>  Issue Type: Improvement
>Reporter: hongwu
>Assignee: hongwu
> Fix For: 2.2.0.0-incubating
>
>
> To make sure every pull requests/commits have valid licenses.
> Since the rat check command will return non-zero code if check fails, we 
> could add this check to the `scipt` attr inside .travis.yml file.



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


[jira] [Resolved] (HAWQ-1145) After registering a partition table, if we want to insert some data into the table, it fails.

2016-12-19 Thread hongwu (JIRA)

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

hongwu resolved HAWQ-1145.
--
Resolution: Fixed
  Assignee: Chunling Wang  (was: Hubert Zhang)

> After registering a partition table, if we want to insert some data into the 
> table, it fails.
> -
>
> Key: HAWQ-1145
> URL: https://issues.apache.org/jira/browse/HAWQ-1145
> Project: Apache HAWQ
>  Issue Type: Bug
>  Components: Command Line Tools
>Affects Versions: 2.0.1.0-incubating
>Reporter: Lili Ma
>Assignee: Chunling Wang
> Fix For: 2.0.1.0-incubating
>
> Attachments: dbgen, dists.dss
>
>
> Reproduce Steps:
> 1. Create a partition table
> {code}
> CREATE TABLE parquet_LINEITEM_uncompressed(   
>   
>   
>   
>  L_ORDERKEY INT8, 
>   
>   
>   
>  L_PARTKEY BIGINT,
>   
>   
>   
>  L_SUPPKEY BIGINT,
>   
>   
>   
>  L_LINENUMBER BIGINT, 
>   
>   
>   
>  L_QUANTITY decimal,  
>   
>   
>   
>  L_EXTENDEDPRICE decimal, 
>   
>   
>   
>  L_DISCOUNT decimal,  
>   
>   
>   
>  L_TAX decimal,   
>   
>   
>   
>  L_RETURNFLAG CHAR(1),
>   
>   
>   
>  L_LINESTATUS 
> CHAR(1),  
>   
>   
>  
> L_SHIPDATE date,  
>   
>   
>   
> L_COMMITDATE date,
> 

[jira] [Resolved] (HAWQ-832) Integrate ICG to Gtest

2016-12-19 Thread hongwu (JIRA)

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

hongwu resolved HAWQ-832.
-
Resolution: Done

> Integrate ICG to Gtest
> --
>
> Key: HAWQ-832
> URL: https://issues.apache.org/jira/browse/HAWQ-832
> Project: Apache HAWQ
>  Issue Type: Test
>  Components: Tests
>Reporter: Jiali Yao
>Assignee: hongwu
> Fix For: 2.0.1.0-incubating
>
> Attachments: GoogleTest.pdf
>
>
> In HAWQ test, google test is used for libyarn and libhdfs test. Install check 
> test framework is used for smoke test and has a lot of limitations. To make 
> it easy to learn and consolidate test, we want to unify the two frameworks. 
> Considering below factors, we want to use google test: 
> It supports more functions and then a developer can write more complex tests 
> which are not only limited to SQL test.  
> Google test support run test parallelly. 
> Google mock is an extension for google test, it can also be used for unit 
> test. 
> Please see the attach file for detail. 



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


[jira] [Assigned] (HAWQ-832) Integrate ICG to Gtest

2016-12-19 Thread hongwu (JIRA)

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

hongwu reassigned HAWQ-832:
---

Assignee: hongwu  (was: Jiali Yao)

> Integrate ICG to Gtest
> --
>
> Key: HAWQ-832
> URL: https://issues.apache.org/jira/browse/HAWQ-832
> Project: Apache HAWQ
>  Issue Type: Test
>  Components: Tests
>Reporter: Jiali Yao
>Assignee: hongwu
> Fix For: 2.0.1.0-incubating
>
> Attachments: GoogleTest.pdf
>
>
> In HAWQ test, google test is used for libyarn and libhdfs test. Install check 
> test framework is used for smoke test and has a lot of limitations. To make 
> it easy to learn and consolidate test, we want to unify the two frameworks. 
> Considering below factors, we want to use google test: 
> It supports more functions and then a developer can write more complex tests 
> which are not only limited to SQL test.  
> Google test support run test parallelly. 
> Google mock is an extension for google test, it can also be used for unit 
> test. 
> Please see the attach file for detail. 



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


[jira] [Resolved] (HAWQ-1044) Verify the correctness of hawq register

2016-12-19 Thread hongwu (JIRA)

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

hongwu resolved HAWQ-1044.
--
Resolution: Done

> Verify the correctness of hawq register
> ---
>
> Key: HAWQ-1044
> URL: https://issues.apache.org/jira/browse/HAWQ-1044
> Project: Apache HAWQ
>  Issue Type: Sub-task
>  Components: Command Line Tools
>Reporter: Lili Ma
>Assignee: hongwu
> Fix For: backlog
>
>
> Verify the correctness of hawq register, summary all the use scenarios and 
> design corresponding test cases for it.
> I think following test cases should be added for the HAWQ register.
> 1. Use Case 1: Register file/folder into HAWQ by specifying file/folder name
> a) hawq register -d postgres -f a.file tableA
> b) hawq register -d postgres -f a.file -e eof tableA
> c) hawq register -d postgres -f folderA tableA
> d) register file to existing table. normal path
> e) register file to existing table. error path: to-be-registered files under 
> the file folder for the existing table on HDFS. Should throw error out.
> f) verify wrong input file. The file format not parquet format.
> 2. Use case 2: Register into HAWQ table using .yml configuration file to a 
> non-existing table
> a) Verify normal input:
> create table a(a int, b int);
> insert into a values(generate_series(1,100), 25);
> hawq extract -d postgres -o a.yml a
> hawq register -d postgres -c a.yml b
> b) Modify the fileSize in .yml file to a value which is different from actual 
> data size of data file
> 3. Use Case 2: Regsiter into HAWQ table using .yml configuration file to an 
> existing table
> a) Verify normal path:
> Call multiple times of hawq register, to verify whether can succeed. Each 
> time the to-be-registered files are not under the table directory.
> b) Error path: to-be-registered files under the file folder for the existing 
> table on HDFS
> Should throw error out: not support!
> 4. Use Case 2: Register into HAWQ table using .yml configuration file by 
> specifying --force option
> a) The table not exist: should create a new table, and do the register
> b) The table already exist, but no data there: can directly call hawq register
> c) Table already exist, and already data there -- normal path: .yml 
> configuration file includes the data files under table directory, and 
> just include those data files.
> d) Table already exist, and already data there -- normal path: .yml 
> configuration file includes the data files under table directory, and 
> also includes data files not under table directory.
> e) Table already exist, and already data there -- error path: .yml 
> configuration file doesn't include the data files under that table directory. 
> Should throw error out, "there are already existing files under the table, 
> but not included in .yml configuration file"
> 5. Use Case 2: Register into HAWQ table using .yml configuration file by 
> specifying --repair option
> a) Normal Path 1: (Append to new file)
> create a tableA
> insert some data into tableA
> call hawq extract the metadata to a.yml file
> insert new data into tableA
> call hawq register --repair option to rollback to the state
> b) Normal Path 2: (New files generated)
> Same as Normal Path 1, but during the second insert, use multiple inserts 
> concurrenly aiming at producing new files. Then call hawq register --repair,
> the new files should be discarded.
> c) Error Path: restributed
> Create a table with hash-distributed, distributed by column A
> insert some data into tableA
> call hawq extract the metadata to a.yml file
> alter table redistributed by column B
> insert new data into tableA
> call hawq register --repair option to rollback to the state  
> --> should throw error "the table is redistributed"
> d) Error Path: table being truncated
> Create a table with hash-distributed, distributed by column A
> insert some data into tableA
> call hawq extract the metadata to a.yml file
> truncate tableA
> call hawq register --repair option to rollback to the state  
> --> should throw error "the table becomes smaller than the .yml config file 
> specified."
> e) Error Path: files specified in .yml configuration not under data directory 
> of table A
> --> should throw error "the files should all under the table directory when 
> --repair option specified for hawq register"
> 6. hawq register partition table support
> a) Normal Path: create a 1-level partition table, calling hawq extract and 
> then hawq register, can work
> b) Error Path: create a 2-level partition table, calling hawq extract and 
> then hawq register, 
> --> should throw error "only supports 1-level partition table"



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


[jira] [Resolved] (HAWQ-1037) modify way to get HDFS port in TestHawqRegister

2016-12-19 Thread hongwu (JIRA)

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

hongwu resolved HAWQ-1037.
--
Resolution: Fixed

> modify way to get HDFS port in TestHawqRegister
> ---
>
> Key: HAWQ-1037
> URL: https://issues.apache.org/jira/browse/HAWQ-1037
> Project: Apache HAWQ
>  Issue Type: Bug
>  Components: Tests
>Reporter: Chunling Wang
>Assignee: Chunling Wang
> Fix For: backlog
>
>
> In test TestHawqRegister, the HDFS port is hard-coded. Now we get the HDFS 
> port from HdfsConfig.



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


[jira] [Resolved] (HAWQ-955) Add script for feature test running in parallel

2016-12-19 Thread hongwu (JIRA)

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

hongwu resolved HAWQ-955.
-
Resolution: Implemented

> Add script for feature test running in parallel
> ---
>
> Key: HAWQ-955
> URL: https://issues.apache.org/jira/browse/HAWQ-955
> Project: Apache HAWQ
>  Issue Type: Sub-task
>  Components: Tests
>Reporter: hongwu
>Assignee: hongwu
> Fix For: 2.0.1.0-incubating
>
>




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


[jira] [Commented] (HAWQ-1212) Upgrade libhdfs3 with upstream hadoop/hdp

2016-12-12 Thread hongwu (JIRA)

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

hongwu commented on HAWQ-1212:
--

Got, thanks.

> Upgrade libhdfs3 with upstream hadoop/hdp
> -
>
> Key: HAWQ-1212
> URL: https://issues.apache.org/jira/browse/HAWQ-1212
> Project: Apache HAWQ
>  Issue Type: New Feature
>  Components: libhdfs
>Reporter: hongwu
>Assignee: Lei Chang
>
> Since current libhdfs3 implementation is based on old version of HDFS, it is 
> necessary to upgrade libhdfs3 with latest HDFS of lots of new features and 
> configuration parameters.



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


[jira] [Commented] (HAWQ-1212) Upgrade libhdfs3 with upstream hadoop/hdp

2016-12-12 Thread hongwu (JIRA)

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

hongwu commented on HAWQ-1212:
--

[~rvs], yes. There needs more investigation to list these details of new 
features. For libhdfs3, you plan to merge its codes to Apache Hadoop codebase?

> Upgrade libhdfs3 with upstream hadoop/hdp
> -
>
> Key: HAWQ-1212
> URL: https://issues.apache.org/jira/browse/HAWQ-1212
> Project: Apache HAWQ
>  Issue Type: New Feature
>  Components: libhdfs
>Reporter: hongwu
>Assignee: Lei Chang
>
> Since current libhdfs3 implementation is based on old version of HDFS, it is 
> necessary to upgrade libhdfs3 with latest HDFS of lots of new features and 
> configuration parameters.



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


[jira] [Resolved] (HAWQ-1213) Incorrect check of hawqregister in case of randomly distributed table with non-default `default_hash_table_bucket_number` value.

2016-12-11 Thread hongwu (JIRA)

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

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

> Incorrect check of hawqregister in case of randomly distributed table with 
> non-default `default_hash_table_bucket_number` value.
> 
>
> Key: HAWQ-1213
> URL: https://issues.apache.org/jira/browse/HAWQ-1213
> Project: Apache HAWQ
>  Issue Type: Bug
>  Components: Command Line Tools
>Affects Versions: 2.0.1.0-incubating
>Reporter: hongwu
>Assignee: hongwu
> Fix For: 2.0.1.0-incubating
>
>
> Bug reproduce process:
> {code}
> postgres=# set default_hash_table_bucket_number=10;
> postgres=# create table sales2( amount numeric(10,2), year integer) 
> with(appendonly=true) distributed randomly partition by range(year) 
> (start(2014) end (2016) every(1));
> postgres=# create table sales6( amount numeric(10,2), year integer) 
> with(appendonly=true) distributed randomly partition by range(year) 
> (start(2014) end (2016) every(1));
> hawq extract -d postgres -o sales2.yml sales2
> hawq register -d postgres --config sales2.yml sales6
> gpadmin-[ERROR]:-Bucket number of public.sales6_1_prt_1 is not consistent 
> with previous bucket number
> {code}



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


[jira] [Updated] (HAWQ-1213) Incorrect check of hawqregister in case of randomly distributed table with non-default `default_hash_table_bucket_number` value.

2016-12-11 Thread hongwu (JIRA)

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

hongwu updated HAWQ-1213:
-
Description: 
Bug reproduce process:

{code}
postgres=# set default_hash_table_bucket_number=10;

postgres=# create table sales2( amount numeric(10,2), year integer) 
with(appendonly=true) distributed randomly partition by range(year) 
(start(2014) end (2016) every(1));

postgres=# create table sales6( amount numeric(10,2), year integer) 
with(appendonly=true) distributed randomly partition by range(year) 
(start(2014) end (2016) every(1));

hawq extract -d postgres -o sales2.yml sales2

hawq register -d postgres --config sales2.yml sales6

gpadmin-[ERROR]:-Bucket number of public.sales6_1_prt_1 is not consistent with 
previous bucket number
{code}

  was:
Bug reproduce process:

{code}
postgres=# set default_hash_table_bucket_number=10;

postgres=# create table sales2( amount numeric(10,2), year integer) 
with(appendonly=true) distributed randomly partition by range(year) 
(start(2014) end (2016) every(1));

hawq extract -d postgres -o sales2.yml sales2

hawq register -d postgres --config sales2.yml sales6

gpadmin-[ERROR]:-Bucket number of public.sales6_1_prt_1 is not consistent with 
previous bucket number
{code}


> Incorrect check of hawqregister in case of randomly distributed table with 
> non-default `default_hash_table_bucket_number` value.
> 
>
> Key: HAWQ-1213
> URL: https://issues.apache.org/jira/browse/HAWQ-1213
> Project: Apache HAWQ
>  Issue Type: Bug
>  Components: Command Line Tools
>Affects Versions: 2.0.1.0-incubating
>Reporter: hongwu
>Assignee: hongwu
>
> Bug reproduce process:
> {code}
> postgres=# set default_hash_table_bucket_number=10;
> postgres=# create table sales2( amount numeric(10,2), year integer) 
> with(appendonly=true) distributed randomly partition by range(year) 
> (start(2014) end (2016) every(1));
> postgres=# create table sales6( amount numeric(10,2), year integer) 
> with(appendonly=true) distributed randomly partition by range(year) 
> (start(2014) end (2016) every(1));
> hawq extract -d postgres -o sales2.yml sales2
> hawq register -d postgres --config sales2.yml sales6
> gpadmin-[ERROR]:-Bucket number of public.sales6_1_prt_1 is not consistent 
> with previous bucket number
> {code}



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


[jira] [Updated] (HAWQ-1213) Incorrect check of hawqregister in case of randomly distributed table with non-default `default_hash_table_bucket_number` value.

2016-12-10 Thread hongwu (JIRA)

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

hongwu updated HAWQ-1213:
-
Description: 
Bug reproduce process:

{code}
postgres=# set default_hash_table_bucket_number=10;

postgres=# create table sales2( amount numeric(10,2), year integer) 
with(appendonly=true) distributed randomly partition by range(year) 
(start(2014) end (2016) every(1));

hawq extract -d postgres -o sales2.yml sales2

hawq register -d postgres --config sales2.yml sales6

gpadmin-[ERROR]:-Bucket number of public.sales6_1_prt_1 is not consistent with 
previous bucket number
{code}

> Incorrect check of hawqregister in case of randomly distributed table with 
> non-default `default_hash_table_bucket_number` value.
> 
>
> Key: HAWQ-1213
> URL: https://issues.apache.org/jira/browse/HAWQ-1213
> Project: Apache HAWQ
>  Issue Type: Bug
>  Components: Command Line Tools
>Affects Versions: 2.0.1.0-incubating
>Reporter: hongwu
>Assignee: hongwu
>
> Bug reproduce process:
> {code}
> postgres=# set default_hash_table_bucket_number=10;
> postgres=# create table sales2( amount numeric(10,2), year integer) 
> with(appendonly=true) distributed randomly partition by range(year) 
> (start(2014) end (2016) every(1));
> hawq extract -d postgres -o sales2.yml sales2
> hawq register -d postgres --config sales2.yml sales6
> gpadmin-[ERROR]:-Bucket number of public.sales6_1_prt_1 is not consistent 
> with previous bucket number
> {code}



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


[jira] [Updated] (HAWQ-1213) Incorrect check of hawqregister in case of randomly distributed table with non-default `default_hash_table_bucket_number` value.

2016-12-10 Thread hongwu (JIRA)

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

hongwu updated HAWQ-1213:
-
Affects Version/s: 2.0.1.0-incubating

> Incorrect check of hawqregister in case of randomly distributed table with 
> non-default `default_hash_table_bucket_number` value.
> 
>
> Key: HAWQ-1213
> URL: https://issues.apache.org/jira/browse/HAWQ-1213
> Project: Apache HAWQ
>  Issue Type: Bug
>  Components: Command Line Tools
>Affects Versions: 2.0.1.0-incubating
>Reporter: hongwu
>Assignee: hongwu
>
> Bug reproduce process:
> {code}
> postgres=# set default_hash_table_bucket_number=10;
> postgres=# create table sales2( amount numeric(10,2), year integer) 
> with(appendonly=true) distributed randomly partition by range(year) 
> (start(2014) end (2016) every(1));
> hawq extract -d postgres -o sales2.yml sales2
> hawq register -d postgres --config sales2.yml sales6
> gpadmin-[ERROR]:-Bucket number of public.sales6_1_prt_1 is not consistent 
> with previous bucket number
> {code}



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


[jira] [Created] (HAWQ-1213) Incorrect check of hawqregister in case of randomly distributed table with non-default `default_hash_table_bucket_number` value.

2016-12-10 Thread hongwu (JIRA)
hongwu created HAWQ-1213:


 Summary: Incorrect check of hawqregister in case of randomly 
distributed table with non-default `default_hash_table_bucket_number` value.
 Key: HAWQ-1213
 URL: https://issues.apache.org/jira/browse/HAWQ-1213
 Project: Apache HAWQ
  Issue Type: Bug
  Components: Command Line Tools
Reporter: hongwu
Assignee: Lei Chang






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


[jira] [Assigned] (HAWQ-1213) Incorrect check of hawqregister in case of randomly distributed table with non-default `default_hash_table_bucket_number` value.

2016-12-10 Thread hongwu (JIRA)

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

hongwu reassigned HAWQ-1213:


Assignee: hongwu  (was: Lei Chang)

> Incorrect check of hawqregister in case of randomly distributed table with 
> non-default `default_hash_table_bucket_number` value.
> 
>
> Key: HAWQ-1213
> URL: https://issues.apache.org/jira/browse/HAWQ-1213
> Project: Apache HAWQ
>  Issue Type: Bug
>  Components: Command Line Tools
>Reporter: hongwu
>Assignee: hongwu
>




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


[jira] [Commented] (HAWQ-716) Support code coverage build and report in hawq Makefile

2016-12-10 Thread hongwu (JIRA)

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

hongwu commented on HAWQ-716:
-

[~huor]

> Support code coverage build and report in hawq Makefile
> ---
>
> Key: HAWQ-716
> URL: https://issues.apache.org/jira/browse/HAWQ-716
> Project: Apache HAWQ
>  Issue Type: Improvement
>  Components: Build
>Affects Versions: 2.0.0.0-incubating
>Reporter: Ruilong Huo
>Assignee: Ruilong Huo
> Fix For: 2.0.0.0-incubating
>
>
> We need to support code coverage build and report in hawq Makefile. The scope 
> include:
> 1. Build hawq/libhdfs3/libyarn binaries with code coverage enabled
> 2. Generate unified code coverage report for hawq/libhdfs3/libyarn



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


[jira] [Commented] (HAWQ-716) Support code coverage build and report in hawq Makefile

2016-12-10 Thread hongwu (JIRA)

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

hongwu commented on HAWQ-716:
-

Hi [~ruilong], does the "Test HAWQ" section in this 
link(https://cwiki.apache.org/confluence/display/HAWQ/Build+and+Install) still 
work?

> Support code coverage build and report in hawq Makefile
> ---
>
> Key: HAWQ-716
> URL: https://issues.apache.org/jira/browse/HAWQ-716
> Project: Apache HAWQ
>  Issue Type: Improvement
>  Components: Build
>Affects Versions: 2.0.0.0-incubating
>Reporter: Ruilong Huo
>Assignee: Ruilong Huo
> Fix For: 2.0.0.0-incubating
>
>
> We need to support code coverage build and report in hawq Makefile. The scope 
> include:
> 1. Build hawq/libhdfs3/libyarn binaries with code coverage enabled
> 2. Generate unified code coverage report for hawq/libhdfs3/libyarn



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


[jira] [Created] (HAWQ-1212) Upgrade libhdfs3 with upstream hadoop/hdp

2016-12-10 Thread hongwu (JIRA)
hongwu created HAWQ-1212:


 Summary: Upgrade libhdfs3 with upstream hadoop/hdp
 Key: HAWQ-1212
 URL: https://issues.apache.org/jira/browse/HAWQ-1212
 Project: Apache HAWQ
  Issue Type: New Feature
  Components: libhdfs
Reporter: hongwu
Assignee: Lei Chang


Since current libhdfs3 implementation is based on old version of HDFS, it is 
necessary to upgrade libhdfs3 with latest HDFS of lots of new features and 
configuration parameters.



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


[jira] [Assigned] (HAWQ-1201) Fix "-Wimplicit-function-declaration, -Wgnu-variable-sized-type-not-at-end, -Wuninitialized, -Wunused-variable, -Wunused-function, -Wmissing-prototypes, -Wtautological-po

2016-12-07 Thread hongwu (JIRA)

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

hongwu reassigned HAWQ-1201:


Assignee: hongwu  (was: Lei Chang)

> Fix "-Wimplicit-function-declaration, -Wgnu-variable-sized-type-not-at-end, 
> -Wuninitialized, -Wunused-variable, -Wunused-function, -Wmissing-prototypes, 
> -Wtautological-pointer-compare, -Wincompatible-pointer-types" warnings.
> 
>
> Key: HAWQ-1201
> URL: https://issues.apache.org/jira/browse/HAWQ-1201
> 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-1201) Fix "-Wimplicit-function-declaration, -Wgnu-variable-sized-type-not-at-end, -Wuninitialized, -Wunused-variable, -Wunused-function, -Wmissing-prototypes, -Wtautological-poi

2016-12-07 Thread hongwu (JIRA)
hongwu created HAWQ-1201:


 Summary: Fix "-Wimplicit-function-declaration, 
-Wgnu-variable-sized-type-not-at-end, -Wuninitialized, -Wunused-variable, 
-Wunused-function, -Wmissing-prototypes, -Wtautological-pointer-compare, 
-Wincompatible-pointer-types" warnings.
 Key: HAWQ-1201
 URL: https://issues.apache.org/jira/browse/HAWQ-1201
 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] [Resolved] (HAWQ-1188) Fix "-Wtautological-constant-out-of-range-compare, -Wtautological-compare, -Wpointer-bool-conversion, -Wnon-literal-null-conversion, -Wincompatible-pointer-types, -Wlogic

2016-12-07 Thread hongwu (JIRA)

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

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

> Fix "-Wtautological-constant-out-of-range-compare, -Wtautological-compare, 
> -Wpointer-bool-conversion, -Wnon-literal-null-conversion, 
> -Wincompatible-pointer-types, -Wlogical-not-parentheses" compile warnings 
> under osx.
> -
>
> Key: HAWQ-1188
> URL: https://issues.apache.org/jira/browse/HAWQ-1188
> Project: Apache HAWQ
>  Issue Type: Sub-task
>  Components: Build
>Reporter: hongwu
>Assignee: hongwu
> Fix For: 2.0.1.0-incubating
>
>
> {code}
> fe-exec.c:2389:27: warning: comparison of constant 8 with expression of type 
> 'ExecStatusType' is always false 
> [-Wtautological-constant-out-of-range-compare]
> if (status < 0 || status >= sizeof pgresStatus / sizeof 
> pgresStatus[0])
>   ~~ ^  ~~
> 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 
> -DUNSAFE_STAT_OK -I. -I../../../src/include  
> -I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include
>  
> -I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include
>  -I../../../src/port  -c -o fe-exec.o fe-exec.c
> fe-exec.c:2671:32: warning: comparison of constant 8 with expression of type 
> 'ExecStatusType' is always false 
> [-Wtautological-constant-out-of-range-compare]
> if ((int)status < 0 || status >= sizeof pgresStatus / sizeof 
> pgresStatus[0])
>~~ ^  
> ~~
> md.c:1289:77: warning: comparison of constant 0 with boolean expression is 
> always false [-Wtautological-constant-out-of-range-compare]
> if (!MirroredBufferPool_Truncate(>mdmir_open, 
> lastsegblocks * BLCKSZ) < 0)
> 
>  ^ ~
> 2 warnings generated.
> segadmin.c:112:30: warning: comparison of constant 32 with boolean expression 
> is always false [-Wtautological-constant-out-of-range-compare]
> 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
>  -I../../../src/interfaces/libpq -I../../../src/backend/gp_libpq_fe 
> -I../../../src/include  
> -I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include
>  
> -I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include
>   -c -o cdbgang.o cdbgang.c
> cdbgang.c:447:61: warning: comparison of constant 10 with expression of type 
> 'GangType' (aka 'enum GangType') is always false 
> [-Wtautological-constant-out-of-range-compare]
> if (gp->gang_id < 1 || gp->gang_id > 1 || gp->type > 10 || 
> gp->size > 10)
>    ^ ~~
> 1 warning generated.
> fe-exec.c:2971:20: warning: address of array 'res->cmdStatus' will always 
> evaluate to 'true' [-Wpointer-bool-conversion]
> if (!res || !res->cmdStatus || strncmp(res->cmdStatus, "INSERT ", 7) 
> != 0)
> ~~^
> fe-exec.c:2995:9: warning: address of array 'res->cmdStatus' will always 
> evaluate to 'true' [-Wpointer-bool-conversion]
> !res->cmdStatus ||
> ~~^
> 3 warnings 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/interfaces/libpq -I../../../src/backend/gp_libpq_fe 
> -I../../../src/include  
> -I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include
>  
> 

[jira] [Resolved] (HAWQ-1190) Fix "Wtypedef-redefinition, Wconstant-logical-operand, Wmemsize-comparison, Wnull-dereference, Wpointer-sign, Wint-conversion" compile warnings.

2016-12-06 Thread hongwu (JIRA)

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

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

> Fix "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
> Fix For: 2.0.1.0-incubating
>
>
> {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 

[jira] [Updated] (HAWQ-1190) Fix "Wtypedef-redefinition, Wconstant-logical-operand, Wmemsize-comparison, Wnull-dereference, Wpointer-sign, Wint-conversion" compile warnings.

2016-12-06 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 "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, 
Wconstant-logical-operand, Wmemsize-comparison, Wnull-dereference, 
Wpointer-sign, Wint-conversion" compile warnings.)

> Fix "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
> Fix For: 2.0.1.0-incubating
>
>
> {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: 

[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] [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)


[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 

[jira] [Resolved] (HAWQ-1189) Split schedule.txt into sanity and full scheduler files for feature tests

2016-12-04 Thread hongwu (JIRA)

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

hongwu resolved HAWQ-1189.
--
Resolution: Resolved

> Split schedule.txt into sanity and full scheduler files for feature tests
> -
>
> Key: HAWQ-1189
> URL: https://issues.apache.org/jira/browse/HAWQ-1189
> Project: Apache HAWQ
>  Issue Type: Test
>  Components: Tests
>Reporter: hongwu
>Assignee: hongwu
> Fix For: 2.0.1.0-incubating
>
>




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


[jira] [Assigned] (HAWQ-1189) Split schedule.txt into sanity and full scheduler files for feature tests

2016-12-04 Thread hongwu (JIRA)

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

hongwu reassigned HAWQ-1189:


Assignee: hongwu  (was: Jiali Yao)

> Split schedule.txt into sanity and full scheduler files for feature tests
> -
>
> Key: HAWQ-1189
> URL: https://issues.apache.org/jira/browse/HAWQ-1189
> Project: Apache HAWQ
>  Issue Type: Test
>  Components: Tests
>Reporter: hongwu
>Assignee: hongwu
> Fix For: 2.0.1.0-incubating
>
>




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


[jira] [Created] (HAWQ-1189) Split schedule.txt into sanity and full scheduler files for feature tests

2016-12-04 Thread hongwu (JIRA)
hongwu created HAWQ-1189:


 Summary: Split schedule.txt into sanity and full scheduler files 
for feature tests
 Key: HAWQ-1189
 URL: https://issues.apache.org/jira/browse/HAWQ-1189
 Project: Apache HAWQ
  Issue Type: Test
  Components: Tests
Reporter: hongwu
Assignee: Jiali Yao
 Fix For: 2.0.1.0-incubating






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


[jira] [Updated] (HAWQ-1188) Fix "-Wtautological-constant-out-of-range-compare, -Wtautological-compare, -Wpointer-bool-conversion, -Wnon-literal-null-conversion, -Wincompatible-pointer-types, -Wlogica

2016-12-03 Thread hongwu (JIRA)

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

hongwu updated HAWQ-1188:
-
Issue Type: Sub-task  (was: Improvement)
Parent: HAWQ-1181

> Fix "-Wtautological-constant-out-of-range-compare, -Wtautological-compare, 
> -Wpointer-bool-conversion, -Wnon-literal-null-conversion, 
> -Wincompatible-pointer-types, -Wlogical-not-parentheses" compile warnings 
> under osx.
> -
>
> Key: HAWQ-1188
> URL: https://issues.apache.org/jira/browse/HAWQ-1188
> Project: Apache HAWQ
>  Issue Type: Sub-task
>  Components: Build
>Reporter: hongwu
>Assignee: hongwu
>
> {code}
> fe-exec.c:2389:27: warning: comparison of constant 8 with expression of type 
> 'ExecStatusType' is always false 
> [-Wtautological-constant-out-of-range-compare]
> if (status < 0 || status >= sizeof pgresStatus / sizeof 
> pgresStatus[0])
>   ~~ ^  ~~
> 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 
> -DUNSAFE_STAT_OK -I. -I../../../src/include  
> -I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include
>  
> -I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include
>  -I../../../src/port  -c -o fe-exec.o fe-exec.c
> fe-exec.c:2671:32: warning: comparison of constant 8 with expression of type 
> 'ExecStatusType' is always false 
> [-Wtautological-constant-out-of-range-compare]
> if ((int)status < 0 || status >= sizeof pgresStatus / sizeof 
> pgresStatus[0])
>~~ ^  
> ~~
> md.c:1289:77: warning: comparison of constant 0 with boolean expression is 
> always false [-Wtautological-constant-out-of-range-compare]
> if (!MirroredBufferPool_Truncate(>mdmir_open, 
> lastsegblocks * BLCKSZ) < 0)
> 
>  ^ ~
> 2 warnings generated.
> segadmin.c:112:30: warning: comparison of constant 32 with boolean expression 
> is always false [-Wtautological-constant-out-of-range-compare]
> 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
>  -I../../../src/interfaces/libpq -I../../../src/backend/gp_libpq_fe 
> -I../../../src/include  
> -I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include
>  
> -I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include
>   -c -o cdbgang.o cdbgang.c
> cdbgang.c:447:61: warning: comparison of constant 10 with expression of type 
> 'GangType' (aka 'enum GangType') is always false 
> [-Wtautological-constant-out-of-range-compare]
> if (gp->gang_id < 1 || gp->gang_id > 1 || gp->type > 10 || 
> gp->size > 10)
>    ^ ~~
> 1 warning generated.
> fe-exec.c:2971:20: warning: address of array 'res->cmdStatus' will always 
> evaluate to 'true' [-Wpointer-bool-conversion]
> if (!res || !res->cmdStatus || strncmp(res->cmdStatus, "INSERT ", 7) 
> != 0)
> ~~^
> fe-exec.c:2995:9: warning: address of array 'res->cmdStatus' will always 
> evaluate to 'true' [-Wpointer-bool-conversion]
> !res->cmdStatus ||
> ~~^
> 3 warnings 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/interfaces/libpq -I../../../src/backend/gp_libpq_fe 
> -I../../../src/include  
> -I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include
>  
> 

[jira] [Updated] (HAWQ-1184) Fix risky "-Wshift-negative-value, -Wparentheses-equality, -Wtautological-compare" types of compile warnings under osx

2016-12-03 Thread hongwu (JIRA)

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

hongwu updated HAWQ-1184:
-
Issue Type: Sub-task  (was: Improvement)
Parent: HAWQ-1181

> Fix risky "-Wshift-negative-value, -Wparentheses-equality, 
> -Wtautological-compare" types of compile warnings under osx
> --
>
> Key: HAWQ-1184
> URL: https://issues.apache.org/jira/browse/HAWQ-1184
> Project: Apache HAWQ
>  Issue Type: Sub-task
>  Components: Build
>Reporter: hongwu
>Assignee: hongwu
> Fix For: 2.0.1.0-incubating
>
>
> http://pastebin.com/DwGqcxr8
> {code}
> url.c:1564:69: warning: shifting a negative signed value is undefined 
> [-Wshift-negative-value]
> pstate->cur_lineno = line_number ? line_number - 1 : 
> (int64) - 1 << 63;
>  
> ~~~ ^
> heap.c:1615:19: warning: equality comparison with extraneous parentheses 
> [-Wparentheses-equality]
> if ((relstorage == RELSTORAGE_PARQUET))
>  ~~~^
> planner.c:679:26: warning: equality comparison with extraneous parentheses 
> [-Wparentheses-equality]
> if ((resourceLife == QRL_ONCE)) {
>  ~^~~
> ./regc_locale.c:358:12: warning: comparison of unsigned expression >= 0 is 
> always true [-Wtautological-compare]
> return (c >= 0 && c <= UCHAR_MAX && isdigit((unsigned char) c));
> ~ ^  ~
> ./regc_locale.c:364:12: warning: comparison of unsigned expression >= 0 is 
> always true [-Wtautological-compare]
> return (c >= 0 && c <= UCHAR_MAX && isalpha((unsigned char) c));
> ~ ^  ~
> ./regc_locale.c:370:12: warning: comparison of unsigned expression >= 0 is 
> always true [-Wtautological-compare]
> return (c >= 0 && c <= UCHAR_MAX && isalnum((unsigned char) c));
> ~ ^  ~
> ./regc_locale.c:376:12: warning: comparison of unsigned expression >= 0 is 
> always true [-Wtautological-compare]
> return (c >= 0 && c <= UCHAR_MAX && isupper((unsigned char) c));
> ~ ^  ~
> ./regc_locale.c:382:12: warning: comparison of unsigned expression >= 0 is 
> always true [-Wtautological-compare]
> return (c >= 0 && c <= UCHAR_MAX && islower((unsigned char) c));
> ~ ^  ~
> ./regc_locale.c:388:12: warning: comparison of unsigned expression >= 0 is 
> always true [-Wtautological-compare]
> return (c >= 0 && c <= UCHAR_MAX && isgraph((unsigned char) c));
> ~ ^  ~
> ./regc_locale.c:394:12: warning: comparison of unsigned expression >= 0 is 
> always true [-Wtautological-compare]
> return (c >= 0 && c <= UCHAR_MAX && isprint((unsigned char) c));
> ~ ^  ~
> ./regc_locale.c:400:12: warning: comparison of unsigned expression >= 0 is 
> always true [-Wtautological-compare]
> return (c >= 0 && c <= UCHAR_MAX && ispunct((unsigned char) c));
> ~ ^  ~
> ./regc_locale.c:406:12: warning: comparison of unsigned expression >= 0 is 
> always true [-Wtautological-compare]
> return (c >= 0 && c <= UCHAR_MAX && isspace((unsigned char) c));
> ~ ^  ~
> ./regc_locale.c:412:8: warning: comparison of unsigned expression >= 0 is 
> always true [-Wtautological-compare]
> if (c >= 0 && c <= UCHAR_MAX)
> ~ ^  ~
> ./regc_locale.c:420:8: warning: comparison of unsigned expression >= 0 is 
> always true [-Wtautological-compare]
> if (c >= 0 && c <= UCHAR_MAX)
> ~ ^  ~
> 11 warnings generated.
> fe-exec.c:2389:13: warning: comparison of unsigned enum expression < 0 is 
> always false [-Wtautological-compare]
> if (status < 0 || status >= sizeof pgresStatus / sizeof 
> pgresStatus[0])
> ~~ ^ ~
> /Users/wuhong/Desktop/2016-Pivotal/Code/github/incubator-hawq/src/bin/gpfdist/src/gpfdist/gpfdist.c:2515:41:
>  warning: comparison of unsigned expression >= 0 is always true
>   [-Wtautological-compare]
> if (r->in.davailable - buf_space_left >= 0)
> ~ ^  ~
> pg_filesystem.c:387:11: warning: comparison of unsigned enum expression < 0 
> is always false [-Wtautological-compare]
> if(ftype < 0 || ftype >= FSYS_FUNC_TOTALNUM)
>~ ^ ~
> pg_filesystem.c:397:11: warning: comparison of unsigned enum expression < 0 
> is always false [-Wtautological-compare]
> if(ftype < 0 || ftype >= FSYS_FUNC_TOTALNUM)
>~ ^ ~
> 2 warnings generated.
> {code}



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


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

2016-12-03 Thread hongwu (JIRA)

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

hongwu updated HAWQ-1187:
-
Issue Type: Sub-task  (was: Improvement)
Parent: HAWQ-1181

> 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
>
> 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 condition is always true
>   

[jira] [Commented] (HAWQ-1188) Fix "-Wtautological-constant-out-of-range-compare, -Wtautological-compare, -Wpointer-bool-conversion, -Wnon-literal-null-conversion, -Wincompatible-pointer-types, -Wlogi

2016-12-02 Thread hongwu (JIRA)

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

hongwu commented on HAWQ-1188:
--

Among these warnings, there are some warnings that should be fixed later on:
{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
 -I. -I../../../../src/include  
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include
 
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include
  -c -o guc.o guc.c
guc.c:5522:3: warning: incompatible pointer types initializing 'int *' with an 
expression of type 'int64 *' (aka 'long *') [-Wincompatible-pointer-types]
_interconnect_transmit_timeout,
^
{code}
This occurs because of the incorrect fix of HAWQ-669 
(https://github.com/apache/incubator-hawq/pull/602) whch needs to be 
reported/fixed in another JIRA.

{code}
pg_backup_files.c:239:11: warning: incompatible pointer types assigning to 
'gzFile *' (aka 'struct gzFile_s **') from 'gzFile' (aka 'struct gzFile_s *') 
[-Wincompatible-pointer-types]
tctx->FH = gzopen(tctx->filename, fmode);
 ^ ~
pg_backup_files.c:253:34: warning: incompatible pointer types passing 'gzFile 
*' (aka 'struct gzFile_s **') to parameter of type 'gzFile' (aka 'struct 
gzFile_s *'); dereference with * [-Wincompatible-pointer-types]
GZWRITE((void *) data, 1, dLen, tctx->FH);
^~~~
*
./pg_backup_archiver.h:47:38: note: expanded from macro 'GZWRITE'
#define GZWRITE(p, s, n, fh) gzwrite(fh, p, (n) * (s))
 ^~
/usr/include/zlib.h:1351:40: note: passing argument to parameter 'file' here
ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
   ^
pg_backup_files.c:264:14: warning: incompatible pointer types passing 'gzFile 
*' (aka 'struct gzFile_s **') to parameter of type 'gzFile' (aka 'struct 
gzFile_s *'); dereference with * [-Wincompatible-pointer-types]
if (GZCLOSE(tctx->FH) != 0)
^~~~
*
./pg_backup_archiver.h:46:29: note: expanded from macro 'GZCLOSE'
#define GZCLOSE(fh) gzclose(fh)
^~
/usr/include/zlib.h:1521:43: note: passing argument to parameter 'file' here
ZEXTERN int ZEXPORTgzclose OF((gzFile file));
  ^
pg_backup_files.c:283:9: warning: incompatible pointer types assigning to 'FILE 
*' (aka 'struct __sFILE *') from 'gzFile' (aka 'struct gzFile_s *') 
[-Wincompatible-pointer-types]
AH->FH = gzopen(filename, "rb");
   ^ ~~
pg_backup_files.c:291:37: warning: incompatible pointer types passing 'FILE *' 
(aka 'struct __sFILE *') to parameter of type 'gzFile' (aka 'struct gzFile_s 
*') [-Wincompatible-pointer-types]
while ((cnt = GZREAD(buf, 1, 4095, AH->FH)) > 0)
   ^~
./pg_backup_archiver.h:48:36: note: expanded from macro 'GZREAD'
#define GZREAD(p, s, n, fh) gzread(fh, p, (n) * (s))
   ^~
/usr/include/zlib.h:1323:39: note: passing argument to parameter 'file' here
ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
  ^
pg_backup_files.c:297:14: warning: incompatible pointer types passing 'FILE *' 
(aka 'struct __sFILE *') to parameter of type 'gzFile' (aka 'struct gzFile_s 
*') [-Wincompatible-pointer-types]
if (GZCLOSE(AH->FH) != 0)
^~
./pg_backup_archiver.h:46:29: note: expanded from macro 'GZCLOSE'
#define GZCLOSE(fh) gzclose(fh)
^~
/usr/include/zlib.h:1521:43: note: passing argument to parameter 'file' here
ZEXTERN int ZEXPORTgzclose OF((gzFile file));
  ^
pg_backup_files.c:503:11: warning: incompatible pointer types assigning to 
'gzFile *' (aka 'struct gzFile_s **') from 'gzFile' (aka 'struct gzFile_s *') 
[-Wincompatible-pointer-types]
tctx->FH = gzopen(fname, fmode);
 ^ 
pg_backup_files.c:523:14: warning: incompatible pointer types passing 'gzFile 
*' (aka 'struct gzFile_s **') to parameter of type 'gzFile' (aka 'struct 
gzFile_s *'); dereference with * [-Wincompatible-pointer-types]
if (GZCLOSE(tctx->FH) != 0)
^~~~
*
./pg_backup_archiver.h:46:29: note: expanded from macro 'GZCLOSE'
#define GZCLOSE(fh) gzclose(fh)
^~

[jira] [Updated] (HAWQ-1188) Fix "-Wtautological-constant-out-of-range-compare, -Wtautological-compare, -Wpointer-bool-conversion, -Wnon-literal-null-conversion, -Wincompatible-pointer-types, -Wlogica

2016-12-02 Thread hongwu (JIRA)

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

hongwu updated HAWQ-1188:
-
Description: 
{code}
fe-exec.c:2389:27: warning: comparison of constant 8 with expression of type 
'ExecStatusType' is always false [-Wtautological-constant-out-of-range-compare]
if (status < 0 || status >= sizeof pgresStatus / sizeof pgresStatus[0])
  ~~ ^  ~~

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 
-DUNSAFE_STAT_OK -I. -I../../../src/include  
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include
 
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include
 -I../../../src/port  -c -o fe-exec.o fe-exec.c
fe-exec.c:2671:32: warning: comparison of constant 8 with expression of type 
'ExecStatusType' is always false [-Wtautological-constant-out-of-range-compare]
if ((int)status < 0 || status >= sizeof pgresStatus / sizeof 
pgresStatus[0])
   ~~ ^  
~~
md.c:1289:77: warning: comparison of constant 0 with boolean expression is 
always false [-Wtautological-constant-out-of-range-compare]
if (!MirroredBufferPool_Truncate(>mdmir_open, 
lastsegblocks * BLCKSZ) < 0)

 ^ ~
2 warnings generated.

segadmin.c:112:30: warning: comparison of constant 32 with boolean expression 
is always false [-Wtautological-constant-out-of-range-compare]
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
 -I../../../src/interfaces/libpq -I../../../src/backend/gp_libpq_fe 
-I../../../src/include  
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include
 
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include
  -c -o cdbgang.o cdbgang.c
cdbgang.c:447:61: warning: comparison of constant 10 with expression of type 
'GangType' (aka 'enum GangType') is always false 
[-Wtautological-constant-out-of-range-compare]
if (gp->gang_id < 1 || gp->gang_id > 1 || gp->type > 10 || 
gp->size > 10)
   ^ ~~
1 warning generated.

fe-exec.c:2971:20: warning: address of array 'res->cmdStatus' will always 
evaluate to 'true' [-Wpointer-bool-conversion]
if (!res || !res->cmdStatus || strncmp(res->cmdStatus, "INSERT ", 7) != 
0)
~~^
fe-exec.c:2995:9: warning: address of array 'res->cmdStatus' will always 
evaluate to 'true' [-Wpointer-bool-conversion]
!res->cmdStatus ||
~~^
3 warnings 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/interfaces/libpq -I../../../src/backend/gp_libpq_fe 
-I../../../src/include  
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include
 
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include
  -c -o cdbsreh.o cdbsreh.c
cdbsreh.c:350:14: warning: address of array 'cdbsreh->filename' will always 
evaluate to 'true' [-Wpointer-bool-conversion]
if(cdbsreh->filename)
~~ ~^~~~
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
 -pthread  -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS  -DFRONTEND 
-DUNSAFE_STAT_OK -I. -I../../../src/include  
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include
 
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include
 -I../../../src/port -I../../../src/port 

[jira] [Updated] (HAWQ-1188) Fix "-Wtautological-constant-out-of-range-compare, -Wtautological-compare, -Wpointer-bool-conversion, -Wnon-literal-null-conversion, -Wincompatible-pointer-types, -Wlogica

2016-12-02 Thread hongwu (JIRA)

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

hongwu updated HAWQ-1188:
-
Summary: Fix "-Wtautological-constant-out-of-range-compare, 
-Wtautological-compare, -Wpointer-bool-conversion, 
-Wnon-literal-null-conversion, -Wincompatible-pointer-types, 
-Wlogical-not-parentheses" compile warnings under osx.  (was: Fix 
"-Wtautological-constant-out-of-range-compare, -Wtautological-compare, 
-Wpointer-bool-conversion, -Wnon-literal-null-conversion, 
-Wincompatible-pointer-types, -Wformat-extra-args, -Wformat, 
-Wlogical-not-parentheses" compile warnings under osx.)

> Fix "-Wtautological-constant-out-of-range-compare, -Wtautological-compare, 
> -Wpointer-bool-conversion, -Wnon-literal-null-conversion, 
> -Wincompatible-pointer-types, -Wlogical-not-parentheses" compile warnings 
> under osx.
> -
>
> Key: HAWQ-1188
> URL: https://issues.apache.org/jira/browse/HAWQ-1188
> Project: Apache HAWQ
>  Issue Type: Improvement
>  Components: Build
>Reporter: hongwu
>Assignee: hongwu
>
> {code}
> fe-exec.c:2389:27: warning: comparison of constant 8 with expression of type 
> 'ExecStatusType' is always false 
> [-Wtautological-constant-out-of-range-compare]
> if (status < 0 || status >= sizeof pgresStatus / sizeof 
> pgresStatus[0])
>   ~~ ^  ~~
> 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 
> -DUNSAFE_STAT_OK -I. -I../../../src/include  
> -I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include
>  
> -I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include
>  -I../../../src/port  -c -o fe-exec.o fe-exec.c
> fe-exec.c:2671:32: warning: comparison of constant 8 with expression of type 
> 'ExecStatusType' is always false 
> [-Wtautological-constant-out-of-range-compare]
> if ((int)status < 0 || status >= sizeof pgresStatus / sizeof 
> pgresStatus[0])
>~~ ^  
> ~~
> md.c:1289:77: warning: comparison of constant 0 with boolean expression is 
> always false [-Wtautological-constant-out-of-range-compare]
> if (!MirroredBufferPool_Truncate(>mdmir_open, 
> lastsegblocks * BLCKSZ) < 0)
> 
>  ^ ~
> 2 warnings generated.
> segadmin.c:112:30: warning: comparison of constant 32 with boolean expression 
> is always false [-Wtautological-constant-out-of-range-compare]
> 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
>  -I../../../src/interfaces/libpq -I../../../src/backend/gp_libpq_fe 
> -I../../../src/include  
> -I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include
>  
> -I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include
>   -c -o cdbgang.o cdbgang.c
> cdbgang.c:447:61: warning: comparison of constant 10 with expression of type 
> 'GangType' (aka 'enum GangType') is always false 
> [-Wtautological-constant-out-of-range-compare]
> if (gp->gang_id < 1 || gp->gang_id > 1 || gp->type > 10 || 
> gp->size > 10)
>    ^ ~~
> 1 warning generated.
> fe-exec.c:2971:20: warning: address of array 'res->cmdStatus' will always 
> evaluate to 'true' [-Wpointer-bool-conversion]
> if (!res || !res->cmdStatus || strncmp(res->cmdStatus, "INSERT ", 7) 
> != 0)
> ~~^
> fe-exec.c:2995:9: warning: address of array 'res->cmdStatus' will always 
> evaluate to 'true' [-Wpointer-bool-conversion]
> !res->cmdStatus ||
> ~~^
> 3 warnings generated.
> gcc -O3 -std=gnu99  -Wall -Wmissing-prototypes -Wpointer-arith  
> -Wendif-labels -Wformat-security -fno-strict-aliasing -fwrapv 
> 

[jira] [Updated] (HAWQ-1188) Fix "-Wtautological-constant-out-of-range-compare, -Wtautological-compare, -Wpointer-bool-conversion, -Wnon-literal-null-conversion, -Wincompatible-pointer-types, -Wformat

2016-12-02 Thread hongwu (JIRA)

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

hongwu updated HAWQ-1188:
-
Description: 
{code}
fe-exec.c:2389:27: warning: comparison of constant 8 with expression of type 
'ExecStatusType' is always false [-Wtautological-constant-out-of-range-compare]
if (status < 0 || status >= sizeof pgresStatus / sizeof pgresStatus[0])
  ~~ ^  ~~

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 
-DUNSAFE_STAT_OK -I. -I../../../src/include  
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include
 
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include
 -I../../../src/port  -c -o fe-exec.o fe-exec.c
fe-exec.c:2671:32: warning: comparison of constant 8 with expression of type 
'ExecStatusType' is always false [-Wtautological-constant-out-of-range-compare]
if ((int)status < 0 || status >= sizeof pgresStatus / sizeof 
pgresStatus[0])
   ~~ ^  
~~
md.c:1289:77: warning: comparison of constant 0 with boolean expression is 
always false [-Wtautological-constant-out-of-range-compare]
if (!MirroredBufferPool_Truncate(>mdmir_open, 
lastsegblocks * BLCKSZ) < 0)

 ^ ~
2 warnings generated.

segadmin.c:112:30: warning: comparison of constant 32 with boolean expression 
is always false [-Wtautological-constant-out-of-range-compare]
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
 -I../../../src/interfaces/libpq -I../../../src/backend/gp_libpq_fe 
-I../../../src/include  
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include
 
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include
  -c -o cdbgang.o cdbgang.c
cdbgang.c:447:61: warning: comparison of constant 10 with expression of type 
'GangType' (aka 'enum GangType') is always false 
[-Wtautological-constant-out-of-range-compare]
if (gp->gang_id < 1 || gp->gang_id > 1 || gp->type > 10 || 
gp->size > 10)
   ^ ~~
1 warning generated.

fe-exec.c:2971:20: warning: address of array 'res->cmdStatus' will always 
evaluate to 'true' [-Wpointer-bool-conversion]
if (!res || !res->cmdStatus || strncmp(res->cmdStatus, "INSERT ", 7) != 
0)
~~^
fe-exec.c:2995:9: warning: address of array 'res->cmdStatus' will always 
evaluate to 'true' [-Wpointer-bool-conversion]
!res->cmdStatus ||
~~^
3 warnings 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/interfaces/libpq -I../../../src/backend/gp_libpq_fe 
-I../../../src/include  
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include
 
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include
  -c -o cdbsreh.o cdbsreh.c
cdbsreh.c:350:14: warning: address of array 'cdbsreh->filename' will always 
evaluate to 'true' [-Wpointer-bool-conversion]
if(cdbsreh->filename)
~~ ~^~~~
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
 -pthread  -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS  -DFRONTEND 
-DUNSAFE_STAT_OK -I. -I../../../src/include  
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include
 
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include
 -I../../../src/port -I../../../src/port 

[jira] [Updated] (HAWQ-1188) Fix "-Wtautological-constant-out-of-range-compare, -Wtautological-compare, -Wpointer-bool-conversion, -Wnon-literal-null-conversion, -Wincompatible-pointer-types, -Wformat

2016-12-02 Thread hongwu (JIRA)

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

hongwu updated HAWQ-1188:
-
Description: 
{code}
fe-exec.c:2389:27: warning: comparison of constant 8 with expression of type 
'ExecStatusType' is always false [-Wtautological-constant-out-of-range-compare]
if (status < 0 || status >= sizeof pgresStatus / sizeof pgresStatus[0])
  ~~ ^  ~~

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 
-DUNSAFE_STAT_OK -I. -I../../../src/include  
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include
 
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include
 -I../../../src/port  -c -o fe-exec.o fe-exec.c
fe-exec.c:2671:32: warning: comparison of constant 8 with expression of type 
'ExecStatusType' is always false [-Wtautological-constant-out-of-range-compare]
if ((int)status < 0 || status >= sizeof pgresStatus / sizeof 
pgresStatus[0])
   ~~ ^  
~~
md.c:1289:77: warning: comparison of constant 0 with boolean expression is 
always false [-Wtautological-constant-out-of-range-compare]
if (!MirroredBufferPool_Truncate(>mdmir_open, 
lastsegblocks * BLCKSZ) < 0)

 ^ ~
2 warnings generated.

segadmin.c:112:30: warning: comparison of constant 32 with boolean expression 
is always false [-Wtautological-constant-out-of-range-compare]
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
 -I../../../src/interfaces/libpq -I../../../src/backend/gp_libpq_fe 
-I../../../src/include  
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include
 
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include
  -c -o cdbgang.o cdbgang.c
cdbgang.c:447:61: warning: comparison of constant 10 with expression of type 
'GangType' (aka 'enum GangType') is always false 
[-Wtautological-constant-out-of-range-compare]
if (gp->gang_id < 1 || gp->gang_id > 1 || gp->type > 10 || 
gp->size > 10)
   ^ ~~
1 warning generated.

fe-exec.c:2971:20: warning: address of array 'res->cmdStatus' will always 
evaluate to 'true' [-Wpointer-bool-conversion]
if (!res || !res->cmdStatus || strncmp(res->cmdStatus, "INSERT ", 7) != 
0)
~~^
fe-exec.c:2995:9: warning: address of array 'res->cmdStatus' will always 
evaluate to 'true' [-Wpointer-bool-conversion]
!res->cmdStatus ||
~~^
3 warnings 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/interfaces/libpq -I../../../src/backend/gp_libpq_fe 
-I../../../src/include  
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include
 
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include
  -c -o cdbsreh.o cdbsreh.c
cdbsreh.c:350:14: warning: address of array 'cdbsreh->filename' will always 
evaluate to 'true' [-Wpointer-bool-conversion]
if(cdbsreh->filename)
~~ ~^~~~
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
 -pthread  -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS  -DFRONTEND 
-DUNSAFE_STAT_OK -I. -I../../../src/include  
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include
 
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include
 -I../../../src/port -I../../../src/port 

[jira] [Updated] (HAWQ-1188) Fix "-Wtautological-constant-out-of-range-compare, -Wtautological-compare, -Wpointer-bool-conversion, -Wnon-literal-null-conversion, -Wincompatible-pointer-types, -Wformat

2016-12-02 Thread hongwu (JIRA)

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

hongwu updated HAWQ-1188:
-
Description: 
{code}
fe-exec.c:2389:27: warning: comparison of constant 8 with expression of type 
'ExecStatusType' is always false [-Wtautological-constant-out-of-range-compare]
if (status < 0 || status >= sizeof pgresStatus / sizeof pgresStatus[0])
  ~~ ^  ~~

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 
-DUNSAFE_STAT_OK -I. -I../../../src/include  
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include
 
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include
 -I../../../src/port  -c -o fe-exec.o fe-exec.c
fe-exec.c:2671:32: warning: comparison of constant 8 with expression of type 
'ExecStatusType' is always false [-Wtautological-constant-out-of-range-compare]
if ((int)status < 0 || status >= sizeof pgresStatus / sizeof 
pgresStatus[0])
   ~~ ^  
~~
md.c:1289:77: warning: comparison of constant 0 with boolean expression is 
always false [-Wtautological-constant-out-of-range-compare]
if (!MirroredBufferPool_Truncate(>mdmir_open, 
lastsegblocks * BLCKSZ) < 0)

 ^ ~
2 warnings generated.

segadmin.c:112:30: warning: comparison of constant 32 with boolean expression 
is always false [-Wtautological-constant-out-of-range-compare]
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
 -I../../../src/interfaces/libpq -I../../../src/backend/gp_libpq_fe 
-I../../../src/include  
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include
 
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include
  -c -o cdbgang.o cdbgang.c
cdbgang.c:447:61: warning: comparison of constant 10 with expression of type 
'GangType' (aka 'enum GangType') is always false 
[-Wtautological-constant-out-of-range-compare]
if (gp->gang_id < 1 || gp->gang_id > 1 || gp->type > 10 || 
gp->size > 10)
   ^ ~~
1 warning generated.

fe-exec.c:2971:20: warning: address of array 'res->cmdStatus' will always 
evaluate to 'true' [-Wpointer-bool-conversion]
if (!res || !res->cmdStatus || strncmp(res->cmdStatus, "INSERT ", 7) != 
0)
~~^
fe-exec.c:2995:9: warning: address of array 'res->cmdStatus' will always 
evaluate to 'true' [-Wpointer-bool-conversion]
!res->cmdStatus ||
~~^
3 warnings 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/interfaces/libpq -I../../../src/backend/gp_libpq_fe 
-I../../../src/include  
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include
 
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include
  -c -o cdbsreh.o cdbsreh.c
cdbsreh.c:350:14: warning: address of array 'cdbsreh->filename' will always 
evaluate to 'true' [-Wpointer-bool-conversion]
if(cdbsreh->filename)
~~ ~^~~~
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
 -pthread  -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS  -DFRONTEND 
-DUNSAFE_STAT_OK -I. -I../../../src/include  
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include
 
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include
 -I../../../src/port -I../../../src/port 

[jira] [Updated] (HAWQ-1188) Fix "-Wtautological-constant-out-of-range-compare, -Wtautological-compare, -Wpointer-bool-conversion, -Wnon-literal-null-conversion, -Wincompatible-pointer-types, -Wformat

2016-12-02 Thread hongwu (JIRA)

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

hongwu updated HAWQ-1188:
-
Summary: Fix "-Wtautological-constant-out-of-range-compare, 
-Wtautological-compare, -Wpointer-bool-conversion, 
-Wnon-literal-null-conversion, -Wincompatible-pointer-types, 
-Wformat-extra-args, -Wformat, -Wlogical-not-parentheses" compile warnings 
under osx.  (was: Fix "-Wtautological-constant-out-of-range-compare, 
-Wautological-compare, -Wpointer-bool-conversion, 
-Wnon-literal-null-conversion, -Wincompatible-pointer-types, 
-Wformat-extra-args, -Wformat, -Wlogical-not-parentheses" compile warnings 
under osx.)

> Fix "-Wtautological-constant-out-of-range-compare, -Wtautological-compare, 
> -Wpointer-bool-conversion, -Wnon-literal-null-conversion, 
> -Wincompatible-pointer-types, -Wformat-extra-args, -Wformat, 
> -Wlogical-not-parentheses" compile warnings under osx.
> 
>
> Key: HAWQ-1188
> URL: https://issues.apache.org/jira/browse/HAWQ-1188
> Project: Apache HAWQ
>  Issue Type: Improvement
>  Components: Build
>Reporter: hongwu
>Assignee: hongwu
>
> {code}
> fe-exec.c:2389:27: warning: comparison of constant 8 with expression of type 
> 'ExecStatusType' is always false 
> [-Wtautological-constant-out-of-range-compare]
> if (status < 0 || status >= sizeof pgresStatus / sizeof 
> pgresStatus[0])
>   ~~ ^  ~~
> 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 
> -DUNSAFE_STAT_OK -I. -I../../../src/include  
> -I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include
>  
> -I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include
>  -I../../../src/port  -c -o fe-exec.o fe-exec.c
> fe-exec.c:2671:32: warning: comparison of constant 8 with expression of type 
> 'ExecStatusType' is always false 
> [-Wtautological-constant-out-of-range-compare]
> if ((int)status < 0 || status >= sizeof pgresStatus / sizeof 
> pgresStatus[0])
>~~ ^  
> ~~
> md.c:1289:77: warning: comparison of constant 0 with boolean expression is 
> always false [-Wtautological-constant-out-of-range-compare]
> if (!MirroredBufferPool_Truncate(>mdmir_open, 
> lastsegblocks * BLCKSZ) < 0)
> 
>  ^ ~
> 2 warnings generated.
> segadmin.c:112:30: warning: comparison of constant 32 with boolean expression 
> is always false [-Wtautological-constant-out-of-range-compare]
> 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
>  -I../../../src/interfaces/libpq -I../../../src/backend/gp_libpq_fe 
> -I../../../src/include  
> -I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include
>  
> -I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include
>   -c -o cdbgang.o cdbgang.c
> cdbgang.c:447:61: warning: comparison of constant 10 with expression of type 
> 'GangType' (aka 'enum GangType') is always false 
> [-Wtautological-constant-out-of-range-compare]
> if (gp->gang_id < 1 || gp->gang_id > 1 || gp->type > 10 || 
> gp->size > 10)
>    ^ ~~
> 1 warning generated.
> fe-exec.c:2971:20: warning: address of array 'res->cmdStatus' will always 
> evaluate to 'true' [-Wpointer-bool-conversion]
> if (!res || !res->cmdStatus || strncmp(res->cmdStatus, "INSERT ", 7) 
> != 0)
> ~~^
> fe-exec.c:2995:9: warning: address of array 'res->cmdStatus' will always 
> evaluate to 'true' [-Wpointer-bool-conversion]
> !res->cmdStatus ||
> ~~^
> 3 warnings generated.
> gcc -O3 -std=gnu99  -Wall -Wmissing-prototypes 

[jira] [Updated] (HAWQ-1188) Fix "-Wtautological-constant-out-of-range-compare, -Wautological-compare, -Wpointer-bool-conversion, -Wnon-literal-null-conversion, -Wincompatible-pointer-types, -Wformat-

2016-12-02 Thread hongwu (JIRA)

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

hongwu updated HAWQ-1188:
-
Description: 
{code}
fe-exec.c:2389:27: warning: comparison of constant 8 with expression of type 
'ExecStatusType' is always false [-Wtautological-constant-out-of-range-compare]
if (status < 0 || status >= sizeof pgresStatus / sizeof pgresStatus[0])
  ~~ ^  ~~

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 
-DUNSAFE_STAT_OK -I. -I../../../src/include  
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include
 
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include
 -I../../../src/port  -c -o fe-exec.o fe-exec.c
fe-exec.c:2671:32: warning: comparison of constant 8 with expression of type 
'ExecStatusType' is always false [-Wtautological-constant-out-of-range-compare]
if ((int)status < 0 || status >= sizeof pgresStatus / sizeof 
pgresStatus[0])
   ~~ ^  
~~
md.c:1289:77: warning: comparison of constant 0 with boolean expression is 
always false [-Wtautological-constant-out-of-range-compare]
if (!MirroredBufferPool_Truncate(>mdmir_open, 
lastsegblocks * BLCKSZ) < 0)

 ^ ~
2 warnings generated.

segadmin.c:112:30: warning: comparison of constant 32 with boolean expression 
is always false [-Wtautological-constant-out-of-range-compare]
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
 -I../../../src/interfaces/libpq -I../../../src/backend/gp_libpq_fe 
-I../../../src/include  
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include
 
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include
  -c -o cdbgang.o cdbgang.c
cdbgang.c:447:61: warning: comparison of constant 10 with expression of type 
'GangType' (aka 'enum GangType') is always false 
[-Wtautological-constant-out-of-range-compare]
if (gp->gang_id < 1 || gp->gang_id > 1 || gp->type > 10 || 
gp->size > 10)
   ^ ~~
1 warning generated.

fe-exec.c:2971:20: warning: address of array 'res->cmdStatus' will always 
evaluate to 'true' [-Wpointer-bool-conversion]
if (!res || !res->cmdStatus || strncmp(res->cmdStatus, "INSERT ", 7) != 
0)
~~^
fe-exec.c:2995:9: warning: address of array 'res->cmdStatus' will always 
evaluate to 'true' [-Wpointer-bool-conversion]
!res->cmdStatus ||
~~^
3 warnings 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/interfaces/libpq -I../../../src/backend/gp_libpq_fe 
-I../../../src/include  
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include
 
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include
  -c -o cdbsreh.o cdbsreh.c
cdbsreh.c:350:14: warning: address of array 'cdbsreh->filename' will always 
evaluate to 'true' [-Wpointer-bool-conversion]
if(cdbsreh->filename)
~~ ~^~~~
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
 -pthread  -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS  -DFRONTEND 
-DUNSAFE_STAT_OK -I. -I../../../src/include  
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include
 
-I/Users/wuhong/Desktop/tmp/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include
 -I../../../src/port -I../../../src/port 

[jira] [Updated] (HAWQ-1188) Fix "-Wtautological-constant-out-of-range-compare, -Wautological-compare, -Wpointer-bool-conversion, -Wnon-literal-null-conversion, -Wincompatible-pointer-types, -Wformat-

2016-12-02 Thread hongwu (JIRA)

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

hongwu updated HAWQ-1188:
-
Summary: Fix "-Wtautological-constant-out-of-range-compare, 
-Wautological-compare, -Wpointer-bool-conversion, 
-Wnon-literal-null-conversion, -Wincompatible-pointer-types, 
-Wformat-extra-args, -Wformat, -Wlogical-not-parentheses" compile warnings 
under osx.  (was: Fix "-Wtautological-constant-out-of-range-compare, 
-Wpointer-bool-conversion, -Wnon-literal-null-conversion, 
-Wincompatible-pointer-types, -Wformat-extra-args, -Wformat, 
-Wlogical-not-parentheses" compile warnings under osx.)

> Fix "-Wtautological-constant-out-of-range-compare, -Wautological-compare, 
> -Wpointer-bool-conversion, -Wnon-literal-null-conversion, 
> -Wincompatible-pointer-types, -Wformat-extra-args, -Wformat, 
> -Wlogical-not-parentheses" compile warnings under osx.
> ---
>
> Key: HAWQ-1188
> URL: https://issues.apache.org/jira/browse/HAWQ-1188
> Project: Apache HAWQ
>  Issue Type: Improvement
>  Components: Build
>Reporter: hongwu
>Assignee: hongwu
>




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


[jira] [Assigned] (HAWQ-1188) Fix "-Wtautological-constant-out-of-range-compare, -Wpointer-bool-conversion, -Wnon-literal-null-conversion, -Wincompatible-pointer-types, -Wformat-extra-args, -Wformat,

2016-12-02 Thread hongwu (JIRA)

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

hongwu reassigned HAWQ-1188:


Assignee: hongwu  (was: Lei Chang)

> Fix "-Wtautological-constant-out-of-range-compare, -Wpointer-bool-conversion, 
> -Wnon-literal-null-conversion, -Wincompatible-pointer-types, 
> -Wformat-extra-args, -Wformat, -Wlogical-not-parentheses" compile warnings 
> under osx.
> 
>
> Key: HAWQ-1188
> URL: https://issues.apache.org/jira/browse/HAWQ-1188
> Project: Apache HAWQ
>  Issue Type: Improvement
>  Components: Build
>Reporter: hongwu
>Assignee: hongwu
>




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


[jira] [Created] (HAWQ-1188) Fix "-Wtautological-constant-out-of-range-compare, -Wpointer-bool-conversion, -Wnon-literal-null-conversion, -Wincompatible-pointer-types, -Wformat-extra-args, -Wformat, -

2016-12-02 Thread hongwu (JIRA)
hongwu created HAWQ-1188:


 Summary: Fix "-Wtautological-constant-out-of-range-compare, 
-Wpointer-bool-conversion, -Wnon-literal-null-conversion, 
-Wincompatible-pointer-types, -Wformat-extra-args, -Wformat, 
-Wlogical-not-parentheses" compile warnings under osx.
 Key: HAWQ-1188
 URL: https://issues.apache.org/jira/browse/HAWQ-1188
 Project: Apache HAWQ
  Issue Type: Improvement
  Components: Build
Reporter: hongwu
Assignee: Lei Chang






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


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

2016-12-02 Thread hongwu (JIRA)

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

hongwu commented on HAWQ-1187:
--

Good advice, thanks! I have modified the description info.

> 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: Improvement
>  Components: Build
>Reporter: hongwu
>Assignee: hongwu
>
> 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 

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

2016-12-02 Thread hongwu (JIRA)

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

hongwu updated HAWQ-1187:
-
Description: 
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 condition is always true
if (IsA(inner_plan, BitmapHeapScan))
^~~~
setrefs.c:1464:26: note: initialize the variable 'bitmapqualorig_p' to silence 
this warning
List **bitmapqualorig_p;
   ^
= NULL
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
 

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

2016-12-02 Thread hongwu (JIRA)

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

hongwu updated HAWQ-1187:
-
Issue Type: Improvement  (was: Bug)

> 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: Improvement
>  Components: Build
>Reporter: hongwu
>Assignee: hongwu
>
> http://pastebin.com/VWSuCwsC



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


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

2016-12-02 Thread hongwu (JIRA)

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

hongwu reassigned HAWQ-1187:


Assignee: hongwu  (was: Lei Chang)

> 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: Bug
>  Components: Build
>Reporter: hongwu
>Assignee: hongwu
>
> http://pastebin.com/VWSuCwsC



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


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

2016-12-02 Thread hongwu (JIRA)

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

hongwu updated HAWQ-1187:
-
Description: http://pastebin.com/VWSuCwsC

> 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: Bug
>  Components: Build
>Reporter: hongwu
>Assignee: Lei Chang
>
> http://pastebin.com/VWSuCwsC



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


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

2016-12-02 Thread hongwu (JIRA)
hongwu created HAWQ-1187:


 Summary: 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: Bug
  Components: Build
Reporter: hongwu
Assignee: Lei Chang






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


[jira] [Resolved] (HAWQ-1184) Fix risky "-Wshift-negative-value, -Wparentheses-equality, -Wtautological-compare" types of compile warnings under osx

2016-12-01 Thread hongwu (JIRA)

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

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

> Fix risky "-Wshift-negative-value, -Wparentheses-equality, 
> -Wtautological-compare" types of compile warnings under osx
> --
>
> Key: HAWQ-1184
> URL: https://issues.apache.org/jira/browse/HAWQ-1184
> Project: Apache HAWQ
>  Issue Type: Improvement
>  Components: Build
>Reporter: hongwu
>Assignee: hongwu
> Fix For: 2.0.1.0-incubating
>
>
> http://pastebin.com/DwGqcxr8



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


[jira] [Assigned] (HAWQ-1184) Fix risky "-Wshift-negative-value, -Wparentheses-equality, -Wtautological-compare" types of compile warnings under osx

2016-12-01 Thread hongwu (JIRA)

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

hongwu reassigned HAWQ-1184:


Assignee: hongwu  (was: Lei Chang)

> Fix risky "-Wshift-negative-value, -Wparentheses-equality, 
> -Wtautological-compare" types of compile warnings under osx
> --
>
> Key: HAWQ-1184
> URL: https://issues.apache.org/jira/browse/HAWQ-1184
> Project: Apache HAWQ
>  Issue Type: Improvement
>  Components: Build
>Reporter: hongwu
>Assignee: hongwu
>
> http://pastebin.com/DwGqcxr8



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


[jira] [Created] (HAWQ-1184) Fix risky "-Wshift-negative-value, -Wparentheses-equality, -Wtautological-compare" types of compile warnings under osx

2016-12-01 Thread hongwu (JIRA)
hongwu created HAWQ-1184:


 Summary: Fix risky "-Wshift-negative-value, 
-Wparentheses-equality, -Wtautological-compare" types of compile warnings under 
osx
 Key: HAWQ-1184
 URL: https://issues.apache.org/jira/browse/HAWQ-1184
 Project: Apache HAWQ
  Issue Type: Improvement
  Components: Build
Reporter: hongwu
Assignee: Lei Chang


http://pastebin.com/DwGqcxr8



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


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

2016-11-30 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.

  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.
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.



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


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

2016-11-30 Thread hongwu (JIRA)
hongwu created HAWQ-1181:


 Summary: 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.
6. Decapitate Autotool and rewrite building system using CMake or other 
libraries.



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


[jira] [Comment Edited] (HAWQ-1043) Enforce -Werror for HAWQ (At least for code under src/backend/cdb and src/backend/resourcemanager)

2016-11-30 Thread hongwu (JIRA)

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

hongwu edited comment on HAWQ-1043 at 12/1/16 5:35 AM:
---

Below is my compiling warnings under osx:

{code}
wuhong@Brainy:~/Desktop/2016-Pivotal/Code/github/incubator-hawq$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr 
--with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin16.1.0
Thread model: posix
InstalledDir: 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
{code}

Warnings:
https://www.zerobin.net/?7e64fa66dda84d5d#RD8FlGcu6caTJNnDGqXUg9n7fV9Kmod+XRyIoHsXsg0=


was (Author: xunzhang):
Below is my compiling warnings under osx:

{code}
wuhong@Brainy:~/Desktop/2016-Pivotal/Code/github/incubator-hawq$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr 
--with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin16.1.0
Thread model: posix
InstalledDir: 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
{/code}

Warnings:
https://www.zerobin.net/?7e64fa66dda84d5d#RD8FlGcu6caTJNnDGqXUg9n7fV9Kmod+XRyIoHsXsg0=

> Enforce -Werror for HAWQ (At least for code under src/backend/cdb and 
> src/backend/resourcemanager)
> --
>
> Key: HAWQ-1043
> URL: https://issues.apache.org/jira/browse/HAWQ-1043
> Project: Apache HAWQ
>  Issue Type: Bug
>Reporter: Paul Guo
>Assignee: Lei Chang
> Fix For: backlog
>
>
> Per discussion on the dev mail list, we will enforce the gcc -Werror option 
> which converts all warnings into errors. This avoids some potential bugs and 
> makes our code neater.



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


[jira] [Comment Edited] (HAWQ-1043) Enforce -Werror for HAWQ (At least for code under src/backend/cdb and src/backend/resourcemanager)

2016-11-30 Thread hongwu (JIRA)

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

hongwu edited comment on HAWQ-1043 at 12/1/16 5:34 AM:
---

Below is my compiling warnings under osx:

{code}
wuhong@Brainy:~/Desktop/2016-Pivotal/Code/github/incubator-hawq$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr 
--with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin16.1.0
Thread model: posix
InstalledDir: 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
{/code}

Warnings:
https://www.zerobin.net/?7e64fa66dda84d5d#RD8FlGcu6caTJNnDGqXUg9n7fV9Kmod+XRyIoHsXsg0=


was (Author: xunzhang):
Below is my compiling warnings under osx:
{code}
wuhong@Brainy:~/Desktop/2016-Pivotal/Code/github/incubator-hawq$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr 
--with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin16.1.0
Thread model: posix
InstalledDir: 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
{/code}

Warnings:
https://www.zerobin.net/?7e64fa66dda84d5d#RD8FlGcu6caTJNnDGqXUg9n7fV9Kmod+XRyIoHsXsg0=

> Enforce -Werror for HAWQ (At least for code under src/backend/cdb and 
> src/backend/resourcemanager)
> --
>
> Key: HAWQ-1043
> URL: https://issues.apache.org/jira/browse/HAWQ-1043
> Project: Apache HAWQ
>  Issue Type: Bug
>Reporter: Paul Guo
>Assignee: Lei Chang
> Fix For: backlog
>
>
> Per discussion on the dev mail list, we will enforce the gcc -Werror option 
> which converts all warnings into errors. This avoids some potential bugs and 
> makes our code neater.



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


[jira] [Commented] (HAWQ-1043) Enforce -Werror for HAWQ (At least for code under src/backend/cdb and src/backend/resourcemanager)

2016-11-30 Thread hongwu (JIRA)

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

hongwu commented on HAWQ-1043:
--

Below is my compiling warnings under osx:
{code}
wuhong@Brainy:~/Desktop/2016-Pivotal/Code/github/incubator-hawq$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr 
--with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin16.1.0
Thread model: posix
InstalledDir: 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
{/code}

Warnings:
https://www.zerobin.net/?7e64fa66dda84d5d#RD8FlGcu6caTJNnDGqXUg9n7fV9Kmod+XRyIoHsXsg0=

> Enforce -Werror for HAWQ (At least for code under src/backend/cdb and 
> src/backend/resourcemanager)
> --
>
> Key: HAWQ-1043
> URL: https://issues.apache.org/jira/browse/HAWQ-1043
> Project: Apache HAWQ
>  Issue Type: Bug
>Reporter: Paul Guo
>Assignee: Lei Chang
> Fix For: backlog
>
>
> Per discussion on the dev mail list, we will enforce the gcc -Werror option 
> which converts all warnings into errors. This avoids some potential bugs and 
> makes our code neater.



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


[jira] [Commented] (HAWQ-1043) Enforce -Werror for HAWQ (At least for code under src/backend/cdb and src/backend/resourcemanager)

2016-11-30 Thread hongwu (JIRA)

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

hongwu commented on HAWQ-1043:
--

We should firstly list all the compile warnings and then decide whether it is 
safe to open -Werror option for the consideration of portability, as we 
discussed in the dev mail list.

> Enforce -Werror for HAWQ (At least for code under src/backend/cdb and 
> src/backend/resourcemanager)
> --
>
> Key: HAWQ-1043
> URL: https://issues.apache.org/jira/browse/HAWQ-1043
> Project: Apache HAWQ
>  Issue Type: Bug
>Reporter: Paul Guo
>Assignee: Lei Chang
> Fix For: backlog
>
>
> Per discussion on the dev mail list, we will enforce the gcc -Werror option 
> which converts all warnings into errors. This avoids some potential bugs and 
> makes our code neater.



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


[jira] [Comment Edited] (HAWQ-1173) hdfsConnect in libhdfs3 is not consistent with hdfsConnect in native libhdfs (JNI) when port is 0

2016-11-26 Thread hongwu (JIRA)

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

hongwu edited comment on HAWQ-1173 at 11/27/16 2:18 AM:


"host should be passed as default (and port as 0) to used the configured 
filesystem (core-site/core-default.xml)." from 
https://github.com/facebookarchive/hadoop-20/blob/master/src/c%2B%2B/libhdfs/hdfs.h#L116
 . 

I think in hadoop20 as facebook 
archive(https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs/hdfs.c#L666),
 the meaning for "hdfsConnect("default", 0)" is equal to meaning of upstream 
hadoop with "hdfsConnect("default", "anyport")", it seems like a double check 
for default behavior with different implementation. To user, 
the usage is the same. So in libhdfs3, can we change the check with "port >= 0"?



was (Author: xunzhang):
"host should be passed as default (and port as 0) to used the configured 
filesystem (core-site/core-default.xml)." from 
https://github.com/facebookarchive/hadoop-20/blob/master/src/c%2B%2B/libhdfs/hdfs.h#L116
 . 

I think in hadoop20 as facebook 
archive(https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs/hdfs.c#L666),
 the meaning for "hdfsConnect("default", 0)" is equal to meaning of upstream 
hadoop with "hdfsConnect("default", "anyport")", it seems like a double check 
for default behavior with different implementation. To user, 
the usage is the same. So in libhdfs3, can we remove the check for "port > 0"?


> hdfsConnect in libhdfs3 is not consistent with hdfsConnect in native libhdfs 
> (JNI) when port is 0
> -
>
> Key: HAWQ-1173
> URL: https://issues.apache.org/jira/browse/HAWQ-1173
> Project: Apache HAWQ
>  Issue Type: Improvement
>  Components: libhdfs
>Reporter: Pierre de Freminville
>Assignee: Zhanwei Wang
>Priority: Trivial
>
> Hello,
> I noticed that the following is not possible with libhdfs3
> {code}hdfsFS fs = hdfsConnect("default", 0);{code}
> because of asserts such as:
> {code}PARAMETER_ASSERT(port > 0, NULL, EINVAL);{code}
> I could be nice to allow that to be consistent with what is done in the 
> native libhdfs (JNI).
> The file of interest in the native library is:
> * hadoop-hdfs-native-client/src/main/native/libhdfs/hdfs.c



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


[jira] [Comment Edited] (HAWQ-1173) hdfsConnect in libhdfs3 is not consistent with hdfsConnect in native libhdfs (JNI) when port is 0

2016-11-26 Thread hongwu (JIRA)

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

hongwu edited comment on HAWQ-1173 at 11/27/16 2:02 AM:


Hi [~pidefrem] , I think it is a known issue. In the current version of 
libhdfs3, we didn't implement the logic to support "port=0". I took a look at 
libhdfs (JNI) code, and I think libhdfs (JNI) has supported 
it(https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs/hdfs.c#L560).

Since libhdfs3 has some gaps with upstream HDFS while libhdfs (JNI) keeps the 
pace with upstream HDFS, we need more contributor to upgrade libhdfs3. Welcome 
pull request! 


was (Author: xunzhang):
Hi [~pidefrem] , I think it is a known issue. In the current version of 
libhdfs3, we didn't implement the logic to support "port=0" which means the 
server will start on a randomly free port in this case. I took a look at 
libhdfs (JNI) code, and I think libhdfs (JNI) has supported 
it(https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs/hdfs.c#L560).

Since libhdfs3 has some gaps with upstream HDFS while libhdfs (JNI) keeps the 
pace with upstream HDFS, we need more contributor to upgrade libhdfs3. If you 
could implement this feature, that will be so great. Welcome pull request! 

> hdfsConnect in libhdfs3 is not consistent with hdfsConnect in native libhdfs 
> (JNI) when port is 0
> -
>
> Key: HAWQ-1173
> URL: https://issues.apache.org/jira/browse/HAWQ-1173
> Project: Apache HAWQ
>  Issue Type: Improvement
>  Components: libhdfs
>Reporter: Pierre de Freminville
>Assignee: Zhanwei Wang
>Priority: Trivial
>
> Hello,
> I noticed that the following is not possible with libhdfs3
> {code}hdfsFS fs = hdfsConnect("default", 0);{code}
> because of asserts such as:
> {code}PARAMETER_ASSERT(port > 0, NULL, EINVAL);{code}
> I could be nice to allow that to be consistent with what is done in the 
> native libhdfs (JNI).
> The file of interest in the native library is:
> * hadoop-hdfs-native-client/src/main/native/libhdfs/hdfs.c



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


[jira] [Commented] (HAWQ-1173) hdfsConnect in libhdfs3 is not consistent with hdfsConnect in native libhdfs (JNI) when port is 0

2016-11-26 Thread hongwu (JIRA)

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

hongwu commented on HAWQ-1173:
--

"host should be passed as default (and port as 0) to used the configured 
filesystem (core-site/core-default.xml)." from 
https://github.com/facebookarchive/hadoop-20/blob/master/src/c%2B%2B/libhdfs/hdfs.h#L116

> hdfsConnect in libhdfs3 is not consistent with hdfsConnect in native libhdfs 
> (JNI) when port is 0
> -
>
> Key: HAWQ-1173
> URL: https://issues.apache.org/jira/browse/HAWQ-1173
> Project: Apache HAWQ
>  Issue Type: Improvement
>  Components: libhdfs
>Reporter: Pierre de Freminville
>Assignee: Zhanwei Wang
>Priority: Trivial
>
> Hello,
> I noticed that the following is not possible with libhdfs3
> {code}hdfsFS fs = hdfsConnect("default", 0);{code}
> because of asserts such as:
> {code}PARAMETER_ASSERT(port > 0, NULL, EINVAL);{code}
> I could be nice to allow that to be consistent with what is done in the 
> native libhdfs (JNI).
> The file of interest in the native library is:
> * hadoop-hdfs-native-client/src/main/native/libhdfs/hdfs.c



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


[jira] [Commented] (HAWQ-1173) hdfsConnect in libhdfs3 is not consistent with hdfsConnect in native libhdfs (JNI) when port is 0

2016-11-26 Thread hongwu (JIRA)

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

hongwu commented on HAWQ-1173:
--

Hi [~wangzw] , can you help to take a look?

> hdfsConnect in libhdfs3 is not consistent with hdfsConnect in native libhdfs 
> (JNI) when port is 0
> -
>
> Key: HAWQ-1173
> URL: https://issues.apache.org/jira/browse/HAWQ-1173
> Project: Apache HAWQ
>  Issue Type: Improvement
>  Components: libhdfs
>Reporter: Pierre de Freminville
>Assignee: Lei Chang
>Priority: Trivial
>
> Hello,
> I noticed that the following is not possible with libhdfs3
> {code}hdfsFS fs = hdfsConnect("default", 0);{code}
> because of asserts such as:
> {code}PARAMETER_ASSERT(port > 0, NULL, EINVAL);{code}
> I could be nice to allow that to be consistent with what is done in the 
> native libhdfs (JNI).
> The file of interest in the native library is:
> * hadoop-hdfs-native-client/src/main/native/libhdfs/hdfs.c



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


[jira] [Commented] (HAWQ-1173) hdfsConnect in libhdfs3 is not consistent with hdfsConnect in native libhdfs (JNI) when port is 0

2016-11-26 Thread hongwu (JIRA)

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

hongwu commented on HAWQ-1173:
--

Hi [~pidefrem] , I think it is a known issue. In the current version of 
libhdfs3, we didn't implement the logic to support "port=0" which means the 
server will start on a randomly free port in this case. I took a look at 
libhdfs (JNI) code, and I think libhdfs (JNI) has supported 
it(https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs/hdfs.c#L560).

Since libhdfs3 has some gaps with upstream HDFS while libhdfs (JNI) keeps the 
pace with upstream HDFS, we need more contributor to upgrade libhdfs3. If you 
could implement this feature, that will be so great. Welcome pull request! 

> hdfsConnect in libhdfs3 is not consistent with hdfsConnect in native libhdfs 
> (JNI) when port is 0
> -
>
> Key: HAWQ-1173
> URL: https://issues.apache.org/jira/browse/HAWQ-1173
> Project: Apache HAWQ
>  Issue Type: Improvement
>  Components: libhdfs
>Reporter: Pierre de Freminville
>Assignee: Lei Chang
>Priority: Trivial
>
> Hello,
> I noticed that the following is not possible with libhdfs3
> {code}hdfsFS fs = hdfsConnect("default", 0);{code}
> because of asserts such as:
> {code}PARAMETER_ASSERT(port > 0, NULL, EINVAL);{code}
> I could be nice to allow that to be consistent with what is done in the 
> native libhdfs (JNI).
> The file of interest in the native library is:
> * hadoop-hdfs-native-client/src/main/native/libhdfs/hdfs.c



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


[jira] [Commented] (HAWQ-1172) FindLibUUID.cmake doesn't include the headers

2016-11-26 Thread hongwu (JIRA)

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

hongwu commented on HAWQ-1172:
--

Thanks [~pidefrem], you are correct, this is a typo. Since the 
"LIBUUID_Libraries" is rightly assigned and it's a built-in library in osx, I 
guess the error occurs in "make" under Linux without uuid library installed. I 
will send a pull request to fix it asap.

> FindLibUUID.cmake doesn't include the headers
> -
>
> Key: HAWQ-1172
> URL: https://issues.apache.org/jira/browse/HAWQ-1172
> Project: Apache HAWQ
>  Issue Type: Bug
>  Components: libhdfs
>Reporter: Pierre de Freminville
>Assignee: Lei Chang
>
> Hello,
> I think there is a bug in depends/libhdfs3/Cmake/*FindLibUUID.cmake*
> The incorrect line is the following:
> {code}FIND_PATH(LIBUUID_INCLUDE_DIR uuid/uuid.h){code}
> It should be replaced with the following:
> {code}FIND_PATH(LIBUUID_INCLUDE_DIRS uuid/uuid.h){code}
> As a side effect you should also change this line:
> {code}FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBUUID DEFAULT_MSG LIBUUID_LIBRARIES 
> LIBUUID_INCLUDE_DIR){code}
> for:
> {code}FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBUUID DEFAULT_MSG LIBUUID_LIBRARIES 
> LIBUUID_INCLUDE_DIRS){code}
> Otherwise the libuuid include directory is not included in the 
> depends/libhdfs3/*src/CMakeLists.txt*:
> {code}INCLUDE_DIRECTORIES(${LIBUUID_INCLUDE_DIRS}){code}



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


[jira] [Commented] (HAWQ-1167) Parquet format table estimate column width meets error for bpchar type

2016-11-21 Thread hongwu (JIRA)

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

hongwu commented on HAWQ-1167:
--

To be more exact, the error is because the line of code 
{code}Insist(columnWidths[colidx] >= min_column_width);{code} in 
`src/backend/cdb/cdbparquetstoragewrite.c`. {cpde}columnWidths[colidx]{cpde} is 
-1 for {code}bpchar{code} type while {code}min_column_width{code} is 1. I will 
fix it soon.

> Parquet format table estimate column width meets error for bpchar type
> --
>
> Key: HAWQ-1167
> URL: https://issues.apache.org/jira/browse/HAWQ-1167
> Project: Apache HAWQ
>  Issue Type: Bug
>  Components: Storage
>Reporter: Lili Ma
>Assignee: hongwu
>
> In function estimateColumnWidth, the atttypmod attribute for type bpchar may 
> be -1, and will provide wrong value to columnWidths. Should estimate a valid 
> length for any type.
> {code}
>   case HAWQ_TYPE_BPCHAR:
>   /* for char(n), atttypmod is n + 4 */
>   Assert(att->atttypmod > 4);
>   columnWidths[(*colidx)++] = att->atttypmod;
> {code}
> Reproduce type:
> 1. create table A(a int, b bpchar);
> 2. select oid from pg_class where relname='a';
> 3. select attname, atttypmod from pg_attribute where attrelid=$oid
> will see the atttypmod is -1, thus will bring error.



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


[jira] [Assigned] (HAWQ-1167) Parquet format table estimate column width meets error for bpchar type

2016-11-21 Thread hongwu (JIRA)

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

hongwu reassigned HAWQ-1167:


Assignee: hongwu  (was: Lei Chang)

> Parquet format table estimate column width meets error for bpchar type
> --
>
> Key: HAWQ-1167
> URL: https://issues.apache.org/jira/browse/HAWQ-1167
> Project: Apache HAWQ
>  Issue Type: Bug
>  Components: Storage
>Reporter: Lili Ma
>Assignee: hongwu
>
> In function estimateColumnWidth, the atttypmod attribute for type bpchar may 
> be -1, and will provide wrong value to columnWidths. Should estimate a valid 
> length for any type.
> {code}
>   case HAWQ_TYPE_BPCHAR:
>   /* for char(n), atttypmod is n + 4 */
>   Assert(att->atttypmod > 4);
>   columnWidths[(*colidx)++] = att->atttypmod;
> {code}
> Reproduce type:
> 1. create table A(a int, b bpchar);
> 2. select oid from pg_class where relname='a';
> 3. select attname, atttypmod from pg_attribute where attrelid=$oid
> will see the atttypmod is -1, thus will bring error.



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


[jira] [Updated] (HAWQ-1166) More friendly error message after hawqregister with original table

2016-11-20 Thread hongwu (JIRA)

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

hongwu updated HAWQ-1166:
-
Description: 
After hawqregister, if users access the original table, he will get message 
below. Although this is a undefined behavior, should we write some record into 
catalog table to return instructive error message in this case?

```
ERROR:  file open error in file 
'hdfs://localhost:8020/hawq_default/16385/16387/16733/1' for relation 't': No 
such file or directory  (seg0 localhost:4 pid=43107)
DETAIL:  
File does not exist: /hawq_default/16385/16387/16733/1
at 
org.apache.hadoop.hdfs.server.namenode.INodeFile.valueOf(INodeFile.java:71)
at 
org.apache.hadoop.hdfs.server.namenode.INodeFile.valueOf(INodeFile.java:61)
at 
org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getBlockLocationsInt(FSNamesystem.java:1828)
at 
org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getBlockLocations(FSNamesystem.java:1799)
at 
org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getBlockLocations(FSNamesystem.java:1712)
at 
org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.getBlockLocations(NameNodeRpcServer.java:587)
at 
org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.getBlockLocations(ClientNamenodeProtocolServerSideTranslatorPB.java:365)
at 
org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java)
at 
org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:616)
at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:969)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2049)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2045)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at 
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2045)
```

  was:
After hawqregister, if users access the original table, he will get message 
below. Although this is a undefined behavior, should we write some record into 
catalog table to return instructive error message in this case?

`
ERROR:  file open error in file 
'hdfs://localhost:8020/hawq_default/16385/16387/16733/1' for relation 't': No 
such file or directory  (seg0 localhost:4 pid=43107)
DETAIL:  
File does not exist: /hawq_default/16385/16387/16733/1
at 
org.apache.hadoop.hdfs.server.namenode.INodeFile.valueOf(INodeFile.java:71)
at 
org.apache.hadoop.hdfs.server.namenode.INodeFile.valueOf(INodeFile.java:61)
at 
org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getBlockLocationsInt(FSNamesystem.java:1828)
at 
org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getBlockLocations(FSNamesystem.java:1799)
at 
org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getBlockLocations(FSNamesystem.java:1712)
at 
org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.getBlockLocations(NameNodeRpcServer.java:587)
at 
org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.getBlockLocations(ClientNamenodeProtocolServerSideTranslatorPB.java:365)
at 
org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java)
at 
org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:616)
at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:969)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2049)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2045)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at 
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2045)
`


> More friendly error message after hawqregister with original table
> --
>
> Key: HAWQ-1166
> URL: https://issues.apache.org/jira/browse/HAWQ-1166
> Project: Apache HAWQ
>  Issue Type: Sub-task
>  Components: Command Line Tools
>Reporter: hongwu
>Assignee: Lei Chang
> Fix For: 2.0.1.0-incubating
>
>
> After hawqregister, if users access the original table, he will get message 
> below. Although this is a undefined behavior, should we write some record 
> into catalog table to return instructive error message in this case?
> ```
> ERROR:  file open error in file 
> 

[jira] [Created] (HAWQ-1166) More Friendly Error Message after hawqregister with original table

2016-11-20 Thread hongwu (JIRA)
hongwu created HAWQ-1166:


 Summary: More Friendly Error Message after hawqregister with 
original table
 Key: HAWQ-1166
 URL: https://issues.apache.org/jira/browse/HAWQ-1166
 Project: Apache HAWQ
  Issue Type: Sub-task
  Components: Command Line Tools
Reporter: hongwu
Assignee: Lei Chang


After hawqregister, if users access the original table, he will get message 
below. Although this is a undefined behavior, should we write some record into 
catalog table to return instructive error message in this case?

`
ERROR:  file open error in file 
'hdfs://localhost:8020/hawq_default/16385/16387/16733/1' for relation 't': No 
such file or directory  (seg0 localhost:4 pid=43107)
DETAIL:  
File does not exist: /hawq_default/16385/16387/16733/1
at 
org.apache.hadoop.hdfs.server.namenode.INodeFile.valueOf(INodeFile.java:71)
at 
org.apache.hadoop.hdfs.server.namenode.INodeFile.valueOf(INodeFile.java:61)
at 
org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getBlockLocationsInt(FSNamesystem.java:1828)
at 
org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getBlockLocations(FSNamesystem.java:1799)
at 
org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getBlockLocations(FSNamesystem.java:1712)
at 
org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.getBlockLocations(NameNodeRpcServer.java:587)
at 
org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.getBlockLocations(ClientNamenodeProtocolServerSideTranslatorPB.java:365)
at 
org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java)
at 
org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:616)
at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:969)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2049)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2045)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at 
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2045)
`



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


[jira] [Updated] (HAWQ-1166) More friendly error message after hawqregister with original table

2016-11-20 Thread hongwu (JIRA)

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

hongwu updated HAWQ-1166:
-
Summary: More friendly error message after hawqregister with original table 
 (was: More Friendly Error Message after hawqregister with original table)

> More friendly error message after hawqregister with original table
> --
>
> Key: HAWQ-1166
> URL: https://issues.apache.org/jira/browse/HAWQ-1166
> Project: Apache HAWQ
>  Issue Type: Sub-task
>  Components: Command Line Tools
>Reporter: hongwu
>Assignee: Lei Chang
> Fix For: 2.0.1.0-incubating
>
>
> After hawqregister, if users access the original table, he will get message 
> below. Although this is a undefined behavior, should we write some record 
> into catalog table to return instructive error message in this case?
> `
> ERROR:  file open error in file 
> 'hdfs://localhost:8020/hawq_default/16385/16387/16733/1' for relation 't': No 
> such file or directory  (seg0 localhost:4 pid=43107)
> DETAIL:  
> File does not exist: /hawq_default/16385/16387/16733/1
>   at 
> org.apache.hadoop.hdfs.server.namenode.INodeFile.valueOf(INodeFile.java:71)
>   at 
> org.apache.hadoop.hdfs.server.namenode.INodeFile.valueOf(INodeFile.java:61)
>   at 
> org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getBlockLocationsInt(FSNamesystem.java:1828)
>   at 
> org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getBlockLocations(FSNamesystem.java:1799)
>   at 
> org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getBlockLocations(FSNamesystem.java:1712)
>   at 
> org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.getBlockLocations(NameNodeRpcServer.java:587)
>   at 
> org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.getBlockLocations(ClientNamenodeProtocolServerSideTranslatorPB.java:365)
>   at 
> org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java)
>   at 
> org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:616)
>   at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:969)
>   at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2049)
>   at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2045)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at javax.security.auth.Subject.doAs(Subject.java:422)
>   at 
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
>   at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2045)
> `



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


[jira] [Commented] (HAWQ-1145) After registering a partition table, if we want to insert some data into the table, it fails.

2016-11-20 Thread hongwu (JIRA)

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

hongwu commented on HAWQ-1145:
--

Thanks, that is helpful!

> After registering a partition table, if we want to insert some data into the 
> table, it fails.
> -
>
> Key: HAWQ-1145
> URL: https://issues.apache.org/jira/browse/HAWQ-1145
> Project: Apache HAWQ
>  Issue Type: Bug
>  Components: Command Line Tools
>Affects Versions: 2.0.1.0-incubating
>Reporter: Lili Ma
>Assignee: Hubert Zhang
> Fix For: 2.0.1.0-incubating
>
> Attachments: dbgen, dists.dss
>
>
> Reproduce Steps:
> 1. Create a partition table
> {code}
> CREATE TABLE parquet_LINEITEM_uncompressed(   
>   
>   
>   
>  L_ORDERKEY INT8, 
>   
>   
>   
>  L_PARTKEY BIGINT,
>   
>   
>   
>  L_SUPPKEY BIGINT,
>   
>   
>   
>  L_LINENUMBER BIGINT, 
>   
>   
>   
>  L_QUANTITY decimal,  
>   
>   
>   
>  L_EXTENDEDPRICE decimal, 
>   
>   
>   
>  L_DISCOUNT decimal,  
>   
>   
>   
>  L_TAX decimal,   
>   
>   
>   
>  L_RETURNFLAG CHAR(1),
>   
>   
>   
>  L_LINESTATUS 
> CHAR(1),  
>   
>   
>  
> L_SHIPDATE date,  
>   
>   
>   
> L_COMMITDATE date,
>   

[jira] [Commented] (HAWQ-1145) After registering a partition table, if we want to insert some data into the table, it fails.

2016-11-20 Thread hongwu (JIRA)

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

hongwu commented on HAWQ-1145:
--

[~lilima] Can you attach '/Users/malili/tpch/lineitem_1g' file here to help 
reproduce the issue?

> After registering a partition table, if we want to insert some data into the 
> table, it fails.
> -
>
> Key: HAWQ-1145
> URL: https://issues.apache.org/jira/browse/HAWQ-1145
> Project: Apache HAWQ
>  Issue Type: Bug
>  Components: Command Line Tools
>Affects Versions: 2.0.1.0-incubating
>Reporter: Lili Ma
>Assignee: Hubert Zhang
> Fix For: 2.0.1.0-incubating
>
>
> Reproduce Steps:
> 1. Create a partition table
> {code}
> CREATE TABLE parquet_LINEITEM_uncompressed(   
>   
>   
>   
>  L_ORDERKEY INT8, 
>   
>   
>   
>  L_PARTKEY BIGINT,
>   
>   
>   
>  L_SUPPKEY BIGINT,
>   
>   
>   
>  L_LINENUMBER BIGINT, 
>   
>   
>   
>  L_QUANTITY decimal,  
>   
>   
>   
>  L_EXTENDEDPRICE decimal, 
>   
>   
>   
>  L_DISCOUNT decimal,  
>   
>   
>   
>  L_TAX decimal,   
>   
>   
>   
>  L_RETURNFLAG CHAR(1),
>   
>   
>   
>  L_LINESTATUS 
> CHAR(1),  
>   
>   
>  
> L_SHIPDATE date,  
>   
>   
>   
> L_COMMITDATE date,
>

[jira] [Commented] (HAWQ-513) initdb.c failed on OSX 10.11.3 due to fgets error

2016-11-09 Thread hongwu (JIRA)

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

hongwu commented on HAWQ-513:
-

Yes, I think after OSX 10.11, the environment variable `DYLD_LIBRARY_PATH` is 
closed unless users reset in recovery mode. Thanks [~hongxu ma] for detailing 
this. :beer

> initdb.c failed on OSX 10.11.3 due to fgets error
> -
>
> Key: HAWQ-513
> URL: https://issues.apache.org/jira/browse/HAWQ-513
> Project: Apache HAWQ
>  Issue Type: Bug
>  Components: Unknown
>Reporter: xin zhang
>Assignee: Lei Chang
> Fix For: backlog
>
>
> we hit following strange issue on OSX 10.11.3:
> The error message in the initdb is: 
> {code}
> 20160301:00:00:26:075823 hawq_init:This-MacBook-Pro:vagrant-[INFO]:-Start to 
> init master node: 'localhost'
> sh: line 1: 76106 Trace/BPT trap: 5   "/usr/local/hawq/bin/postgres" -V 
> 2> /dev/null
> fgets failure: Undefined error: 0
> The program "postgres" is needed by initdb but was either not found in the 
> same directory as "/usr/local/hawq/bin/initdb" or failed unexpectedly.
> Check your installation; "postgres -V" may have more information.
> Master postgres initdb failed
> {code}
> We suspect the issue due to the newer version of the libSystem.B.dylib on OSX 
> 10.11.3.
> Here is the details of the dependencies of `postgres` and `initdb`:
> 10.10.5, postgres can start, and initdb succeed:
> {code}
> [bin: xzhang{master}]$ otool -L postgres
> postgres:
> /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 
> 120.0.0)
> libhdfs3.1.dylib (compatibility version 1.0.0, current version 2.2.30)
> /usr/lib/libxml2.2.dylib (compatibility version 10.0.0, current version 
> 10.9.0)
> libyarn.1.dylib (compatibility version 1.0.0, current version 0.1.13)
> /usr/local/opt/json-c/lib/libjson-c.2.dylib (compatibility version 3.0.0, 
> current version 3.1.0)
> /usr/local/opt/snappy/lib/libsnappy.1.dylib (compatibility version 5.0.0, 
> current version 5.0.0)
> /usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 
> 1.0.5)
> /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 
> 1213.0.0)
> /usr/lib/libcurl.4.dylib (compatibility version 7.0.0, current version 
> 8.0.0)
> /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos 
> (compatibility version 5.0.0, current version 6.0.0)
> libdxltranslators.dylib (compatibility version 0.0.0, current version 
> 0.0.0)
> /usr/local/opt/thrift/lib/libthrift-0.9.3.dylib (compatibility version 
> 0.0.0, current version 0.0.0)
> This-MacBook-Pro:bin vagrant$ otool -L initdb
> initdb:
> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 
> 1226.10.1)
> {code}
> 10.11.3, postgres can start, but initdb failed:
> {code}
> This-MacBook-Pro:bin vagrant$ otool -L postgres
> postgres:
> /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 
> 120.1.0)
> libhdfs3.1.dylib (compatibility version 1.0.0, current version 2.2.30)
> /usr/lib/libxml2.2.dylib (compatibility version 10.0.0, current version 
> 10.9.0)
> libyarn.1.dylib (compatibility version 1.0.0, current version 0.1.13)
> /usr/local/opt/json-c/lib/libjson-c.2.dylib (compatibility version 3.0.0, 
> current version 3.1.0)
> /usr/local/opt/snappy/lib/libsnappy.1.dylib (compatibility version 5.0.0, 
> current version 5.0.0)
> /usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 
> 1.0.5)
> /usr/lib/libssl.0.9.8.dylib (compatibility version 0.9.8, current version 
> 0.9.8)
> /usr/lib/libcrypto.0.9.8.dylib (compatibility version 0.9.8, current 
> version 0.9.8)
> /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 
> 1226.10.1)
> /usr/lib/libcurl.4.dylib (compatibility version 7.0.0, current version 
> 8.0.0)
> /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos 
> (compatibility version 5.0.0, current version 6.0.0)
> libdxltranslators.dylib (compatibility version 0.0.0, current version 
> 0.0.0)
> /usr/local/opt/thrift/lib/libthrift-0.9.3.dylib (compatibility version 
> 0.0.0, current version 0.0.0)
> [bin: xzhang{master}]$ otool -L initdb
> initdb:
> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 
> 1213.0.0)
> {code}
> In this case, there is a difference between the two OS regarding to the 
> libSystem.B.dylib.
> Question is how to fix it? For example, how to change the libSystem.B.dylib 
> to an older version? or, how to fix the postgres or initdb so that they works 
> on the new OSX 10.11.3?



--

[jira] [Commented] (HAWQ-968) Incorrect free in url_fclose

2016-11-07 Thread hongwu (JIRA)

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

hongwu commented on HAWQ-968:
-

OK, you are correct [~liming01]. Maybe I made a mistake before, but I think 
this function should be further refactored since current implementation is a 
little confused. Thanks.

> Incorrect free in url_fclose
> 
>
> Key: HAWQ-968
> URL: https://issues.apache.org/jira/browse/HAWQ-968
> Project: Apache HAWQ
>  Issue Type: Bug
>  Components: External Tables
>Affects Versions: backlog
>Reporter: hongwu
>Assignee: hongwu
>Priority: Minor
> Fix For: backlog
>
>
> There is potential double free risk in 
> url_fclose(https://github.com/apache/incubator-hawq/blob/master/src/backend/access/external/url.c#L1161)
>  of url.c.



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


[jira] [Updated] (HAWQ-968) Incorrect free in url_fclose

2016-11-06 Thread hongwu (JIRA)

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

hongwu updated HAWQ-968:

Priority: Minor  (was: Major)

> Incorrect free in url_fclose
> 
>
> Key: HAWQ-968
> URL: https://issues.apache.org/jira/browse/HAWQ-968
> Project: Apache HAWQ
>  Issue Type: Bug
>  Components: External Tables
>Affects Versions: backlog
>Reporter: hongwu
>Assignee: hongwu
>Priority: Minor
> Fix For: backlog
>
>
> There is potential double free risk in 
> url_fclose(https://github.com/apache/incubator-hawq/blob/master/src/backend/access/external/url.c#L1161)
>  of url.c.



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


[jira] [Updated] (HAWQ-968) Incorrect free in url_close

2016-11-06 Thread hongwu (JIRA)

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

hongwu updated HAWQ-968:

Description: There is potential double free risk in 
url_fclose(https://github.com/apache/incubator-hawq/blob/master/src/backend/access/external/url.c#L1161)
 of url.c.  (was: There is potential double free risk in url_close of url.c)

> Incorrect free in url_close
> ---
>
> Key: HAWQ-968
> URL: https://issues.apache.org/jira/browse/HAWQ-968
> Project: Apache HAWQ
>  Issue Type: Bug
>  Components: External Tables
>Affects Versions: backlog
>Reporter: hongwu
>Assignee: hongwu
> Fix For: backlog
>
>
> There is potential double free risk in 
> url_fclose(https://github.com/apache/incubator-hawq/blob/master/src/backend/access/external/url.c#L1161)
>  of url.c.



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


[jira] [Updated] (HAWQ-1147) Analyze will ERROR after register multiple parquet data files to a parquet table while enable debug and cassert in hawq configure

2016-11-04 Thread hongwu (JIRA)

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

hongwu updated HAWQ-1147:
-
Affects Version/s: 2.0.1.0-incubating

> Analyze will ERROR after register multiple parquet data files to a parquet 
> table while enable debug and cassert in hawq configure
> -
>
> Key: HAWQ-1147
> URL: https://issues.apache.org/jira/browse/HAWQ-1147
> Project: Apache HAWQ
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 2.0.1.0-incubating
>Reporter: Xiang Sheng
>Assignee: Lei Chang
> Fix For: 2.0.1.0-incubating
>
>
> Enable debug and cassert in hawq configure, analyze will report Unexpected 
> internal error after register multiple parquet data files to the table. 
> reproduce steps:
> reproduce steps: 
> 1.  ./configure --enable-debug  --enable-cassert
> 2.  make -j8
> 3.  make install
> 4.  hawq init cluster -a
> 5.  hadoop fs -mkdir hdfs://localhost:8020/hawq_register_test
> 6.  hadoop fs -put 
> $hawq_home/src/test/feature/ManagementTool/test_hawq_register_hawq.paq 
> hdfs://localhost:8020/hawq_register_test/hawq1.paq
> 7.  create table t (i int) with (appendonly=true, orientation=parquet);
> 8.  hawq register -d postgres -f 
> hdfs://localhost:8020/hawq_register_test/hawq1.paq  t
> 9.  
> postgres=#  select oid from pg_class where relname = 't';
> oid
>+--+
>  24586
> (1 row)
> postgres=# select * from pg_aoseg.pg_paqseg_24586;
>  segno | eof | tupcount | eofuncompressed
> ---+-+--+-
>  1 | 657 |   -1 |  -1
> (1 rows)
> postgres=#analyze t;
> FATAL:  Unexpected internal error (analyze.c:1718)
> DETAIL:  FailedAssertion("!(relTuples > -1.0)", File: "analyze.c", Line: 1718)
> HINT:  Process 43356 will wait for gp_debug_linger=120 seconds before 
> termination.
> Note that its locks and other resources will not be released until then.
> server closed the connection unexpectedly
>   This probably means the server terminated abnormally
>   before or while processing the request.
> The connection to the server was lost. Attempting reset: Succeeded



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


[jira] [Updated] (HAWQ-1145) After registering a partition table, if we want to insert some data into the table, it fails.

2016-11-03 Thread hongwu (JIRA)

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

hongwu updated HAWQ-1145:
-
Affects Version/s: 2.0.1.0-incubating

> After registering a partition table, if we want to insert some data into the 
> table, it fails.
> -
>
> Key: HAWQ-1145
> URL: https://issues.apache.org/jira/browse/HAWQ-1145
> Project: Apache HAWQ
>  Issue Type: Bug
>  Components: Command Line Tools
>Affects Versions: 2.0.1.0-incubating
>Reporter: Lili Ma
>Assignee: Hubert Zhang
> Fix For: 2.0.1.0-incubating
>
>
> Reproduce Steps:
> 1. Create a partition table
> {code}
> CREATE TABLE parquet_LINEITEM_uncompressed(   
>   
>   
>   
>  L_ORDERKEY INT8, 
>   
>   
>   
>  L_PARTKEY BIGINT,
>   
>   
>   
>  L_SUPPKEY BIGINT,
>   
>   
>   
>  L_LINENUMBER BIGINT, 
>   
>   
>   
>  L_QUANTITY decimal,  
>   
>   
>   
>  L_EXTENDEDPRICE decimal, 
>   
>   
>   
>  L_DISCOUNT decimal,  
>   
>   
>   
>  L_TAX decimal,   
>   
>   
>   
>  L_RETURNFLAG CHAR(1),
>   
>   
>   
>  L_LINESTATUS 
> CHAR(1),  
>   
>   
>  
> L_SHIPDATE date,  
>   
>   
>   
> L_COMMITDATE date,
>   
>

[jira] [Updated] (HAWQ-1140) Parallelize test cases for hawqregister

2016-11-03 Thread hongwu (JIRA)

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

hongwu updated HAWQ-1140:
-
Affects Version/s: 2.0.1.0-incubating

> Parallelize test cases for hawqregister
> ---
>
> Key: HAWQ-1140
> URL: https://issues.apache.org/jira/browse/HAWQ-1140
> Project: Apache HAWQ
>  Issue Type: Sub-task
>  Components: Command Line Tools
>Affects Versions: 2.0.1.0-incubating
>Reporter: hongwu
>Assignee: hongwu
> Fix For: 2.0.1.0-incubating
>
>
> Refactor test cases to make hawqregister tests run parallel.



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


[jira] [Resolved] (HAWQ-1133) Should print out date/time information in hawq register output.

2016-11-02 Thread hongwu (JIRA)

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

hongwu resolved HAWQ-1133.
--
Resolution: Fixed

> Should print out date/time information in hawq register output.
> ---
>
> Key: HAWQ-1133
> URL: https://issues.apache.org/jira/browse/HAWQ-1133
> Project: Apache HAWQ
>  Issue Type: Sub-task
>  Components: Command Line Tools
>Reporter: hongwu
>Assignee: hongwu
> Fix For: 2.0.1.0-incubating
>
>




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


[jira] [Assigned] (HAWQ-1140) Parallelize test cases for hawqregister

2016-11-02 Thread hongwu (JIRA)

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

hongwu reassigned HAWQ-1140:


Assignee: hongwu  (was: Lei Chang)

> Parallelize test cases for hawqregister
> ---
>
> Key: HAWQ-1140
> URL: https://issues.apache.org/jira/browse/HAWQ-1140
> Project: Apache HAWQ
>  Issue Type: Sub-task
>  Components: Command Line Tools
>Reporter: hongwu
>Assignee: hongwu
> Fix For: 2.0.1.0-incubating
>
>
> Refactor test cases to make hawqregister tests run parallel.



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


[jira] [Created] (HAWQ-1140) Parallelize test cases for hawqregister

2016-11-02 Thread hongwu (JIRA)
hongwu created HAWQ-1140:


 Summary: Parallelize test cases for hawqregister
 Key: HAWQ-1140
 URL: https://issues.apache.org/jira/browse/HAWQ-1140
 Project: Apache HAWQ
  Issue Type: Sub-task
  Components: Command Line Tools
Reporter: hongwu
Assignee: Lei Chang
 Fix For: 2.0.1.0-incubating


Refactor test cases to make hawqregister tests run parallel.



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


[jira] [Resolved] (HAWQ-1128) Support HAWQ register tables with same file name in different schema

2016-11-01 Thread hongwu (JIRA)

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

hongwu resolved HAWQ-1128.
--
Resolution: Implemented

> Support HAWQ register tables with same file name in different schema
> 
>
> Key: HAWQ-1128
> URL: https://issues.apache.org/jira/browse/HAWQ-1128
> Project: Apache HAWQ
>  Issue Type: Sub-task
>  Components: Command Line Tools
>Affects Versions: 2.0.1.0-incubating
>Reporter: Chunling Wang
>Assignee: hongwu
> Fix For: 2.0.1.0-incubating
>
>
> Now, in HAWQ Register, it can not distinguish tables with same file name but 
> in different schema, which are regarded as same table. We should save and use 
> schema information for HAWQ register.



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


[jira] [Created] (HAWQ-1133) Should print out date/time information in hawq register output.

2016-11-01 Thread hongwu (JIRA)
hongwu created HAWQ-1133:


 Summary: Should print out date/time information in hawq register 
output.
 Key: HAWQ-1133
 URL: https://issues.apache.org/jira/browse/HAWQ-1133
 Project: Apache HAWQ
  Issue Type: Sub-task
  Components: Command Line Tools
Reporter: hongwu
Assignee: Lei Chang
 Fix For: 2.0.1.0-incubating






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


[jira] [Assigned] (HAWQ-1133) Should print out date/time information in hawq register output.

2016-11-01 Thread hongwu (JIRA)

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

hongwu reassigned HAWQ-1133:


Assignee: hongwu  (was: Lei Chang)

> Should print out date/time information in hawq register output.
> ---
>
> Key: HAWQ-1133
> URL: https://issues.apache.org/jira/browse/HAWQ-1133
> Project: Apache HAWQ
>  Issue Type: Sub-task
>  Components: Command Line Tools
>Reporter: hongwu
>Assignee: hongwu
> Fix For: 2.0.1.0-incubating
>
>




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


[jira] [Updated] (HAWQ-1128) Support HAWQ register tables with same file name in different schema

2016-11-01 Thread hongwu (JIRA)

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

hongwu updated HAWQ-1128:
-
Fix Version/s: (was: backlog)
   2.0.1.0-incubating

> Support HAWQ register tables with same file name in different schema
> 
>
> Key: HAWQ-1128
> URL: https://issues.apache.org/jira/browse/HAWQ-1128
> Project: Apache HAWQ
>  Issue Type: Sub-task
>  Components: Command Line Tools
>Affects Versions: 2.0.1.0-incubating
>Reporter: Chunling Wang
>Assignee: hongwu
> Fix For: 2.0.1.0-incubating
>
>
> Now, in HAWQ Register, it can not distinguish tables with same file name but 
> in different schema, which are regarded as same table. We should save and use 
> schema information for HAWQ register.



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


[jira] [Updated] (HAWQ-1128) Support HAWQ register tables with same file name in different schema

2016-11-01 Thread hongwu (JIRA)

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

hongwu updated HAWQ-1128:
-
Affects Version/s: 2.0.1.0-incubating

> Support HAWQ register tables with same file name in different schema
> 
>
> Key: HAWQ-1128
> URL: https://issues.apache.org/jira/browse/HAWQ-1128
> Project: Apache HAWQ
>  Issue Type: Sub-task
>  Components: Command Line Tools
>Affects Versions: 2.0.1.0-incubating
>Reporter: Chunling Wang
>Assignee: hongwu
> Fix For: 2.0.1.0-incubating
>
>
> Now, in HAWQ Register, it can not distinguish tables with same file name but 
> in different schema, which are regarded as same table. We should save and use 
> schema information for HAWQ register.



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


[jira] [Assigned] (HAWQ-1128) Support HAWQ register tables with same file name in different schema

2016-10-31 Thread hongwu (JIRA)

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

hongwu reassigned HAWQ-1128:


Assignee: hongwu  (was: Chunling Wang)

> Support HAWQ register tables with same file name in different schema
> 
>
> Key: HAWQ-1128
> URL: https://issues.apache.org/jira/browse/HAWQ-1128
> Project: Apache HAWQ
>  Issue Type: Sub-task
>  Components: Command Line Tools
>Reporter: Chunling Wang
>Assignee: hongwu
> Fix For: backlog
>
>
> Now, in HAWQ Register, it can not distinguish tables with same file name but 
> in different schema, which are regarded as same table. We should save and use 
> schema information for HAWQ register.



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


[jira] [Resolved] (HAWQ-1120) Optimize hawqregister performance

2016-10-25 Thread hongwu (JIRA)

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

hongwu resolved HAWQ-1120.
--
Resolution: Done

> Optimize hawqregister performance
> -
>
> Key: HAWQ-1120
> URL: https://issues.apache.org/jira/browse/HAWQ-1120
> Project: Apache HAWQ
>  Issue Type: Sub-task
>  Components: Command Line Tools
>Reporter: hongwu
>Assignee: hongwu
> Fix For: 2.0.1.0-incubating
>
>
> move_files_in_hdfs, check_sizes_valid and check_file_not_folder take 30% 
> execute time of hawqregister since invoking hadoop shell command has 1-2s 
> lantency each time.
> In check_sizes_valid, we could bind "du" operation together to optimize. For 
> the other two functions, there is nothing to do.



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


[jira] [Assigned] (HAWQ-1120) Optimize hawqregister performance

2016-10-25 Thread hongwu (JIRA)

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

hongwu reassigned HAWQ-1120:


Assignee: hongwu  (was: Lei Chang)

> Optimize hawqregister performance
> -
>
> Key: HAWQ-1120
> URL: https://issues.apache.org/jira/browse/HAWQ-1120
> Project: Apache HAWQ
>  Issue Type: Sub-task
>  Components: Command Line Tools
>Reporter: hongwu
>Assignee: hongwu
> Fix For: 2.0.1.0-incubating
>
>
> move_files_in_hdfs, check_sizes_valid and check_file_not_folder take 30% 
> execute time of hawqregister since invoking hadoop shell command has 1-2s 
> lantency.
> In check_sizes_valid, we could bind du operation together to optimize. For 
> the other two functions, there is nothing to do with it.



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


[jira] [Created] (HAWQ-1120) Optimize hawqregister performance

2016-10-25 Thread hongwu (JIRA)
hongwu created HAWQ-1120:


 Summary: Optimize hawqregister performance
 Key: HAWQ-1120
 URL: https://issues.apache.org/jira/browse/HAWQ-1120
 Project: Apache HAWQ
  Issue Type: Sub-task
  Components: Command Line Tools
Reporter: hongwu
Assignee: Lei Chang
 Fix For: 2.0.1.0-incubating


move_files_in_hdfs, check_sizes_valid and check_file_not_folder take 30% 
execute time of hawqregister since invoking hadoop shell command has 1-2s 
lantency.

In check_sizes_valid, we could bind du operation together to optimize. For the 
other two functions, there is nothing to do with it.



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


[jira] [Resolved] (HAWQ-1099) Output yaml file should not contain Bucketnum attribute with random distributed table

2016-10-17 Thread hongwu (JIRA)

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

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

> Output yaml file should not contain Bucketnum attribute with random 
> distributed table
> -
>
> Key: HAWQ-1099
> URL: https://issues.apache.org/jira/browse/HAWQ-1099
> Project: Apache HAWQ
>  Issue Type: Sub-task
>  Components: Command Line Tools
>Reporter: hongwu
>Assignee: hongwu
> Fix For: 2.0.1.0-incubating
>
>
> Output yaml file should not contain Bucketnum attribute with random 
> distributed table. And hawq register should check Bucketnum attribute only 
> with hash randomly distributed table.



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


[jira] [Assigned] (HAWQ-1099) Output yaml file should not contain Bucketnum attribute with random distributed table

2016-10-13 Thread hongwu (JIRA)

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

hongwu reassigned HAWQ-1099:


Assignee: hongwu  (was: Lei Chang)

> Output yaml file should not contain Bucketnum attribute with random 
> distributed table
> -
>
> Key: HAWQ-1099
> URL: https://issues.apache.org/jira/browse/HAWQ-1099
> Project: Apache HAWQ
>  Issue Type: Sub-task
>  Components: Command Line Tools
>Reporter: hongwu
>Assignee: hongwu
>
> Output yaml file should not contain Bucketnum attribute with random 
> distributed table. And hawq register should check Bucketnum attribute only 
> with hash randomly distributed table.



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


[jira] [Updated] (HAWQ-1099) Output yaml file should not contain Bucketnum attribute with random distributed table

2016-10-13 Thread hongwu (JIRA)

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

hongwu updated HAWQ-1099:
-
Issue Type: Sub-task  (was: Bug)
Parent: HAWQ-991

> Output yaml file should not contain Bucketnum attribute with random 
> distributed table
> -
>
> Key: HAWQ-1099
> URL: https://issues.apache.org/jira/browse/HAWQ-1099
> Project: Apache HAWQ
>  Issue Type: Sub-task
>  Components: Command Line Tools
>Reporter: hongwu
>Assignee: Lei Chang
>
> Output yaml file should not contain Bucketnum attribute with random 
> distributed table. And hawq register should check Bucketnum attribute only 
> with hash randomly distributed table.



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


[jira] [Created] (HAWQ-1099) Output yaml file should not contain Bucketnum attribute with random distributed table

2016-10-13 Thread hongwu (JIRA)
hongwu created HAWQ-1099:


 Summary: Output yaml file should not contain Bucketnum attribute 
with random distributed table
 Key: HAWQ-1099
 URL: https://issues.apache.org/jira/browse/HAWQ-1099
 Project: Apache HAWQ
  Issue Type: Bug
  Components: Command Line Tools
Reporter: hongwu
Assignee: Lei Chang


Output yaml file should not contain Bucketnum attribute with random distributed 
table. And hawq register should check Bucketnum attribute only with hash 
randomly distributed table.



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


[jira] [Resolved] (HAWQ-1061) Improve hawq register for already bugs found

2016-09-27 Thread hongwu (JIRA)

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

hongwu resolved HAWQ-1061.
--
Resolution: Fixed

> Improve hawq register for already bugs found
> 
>
> Key: HAWQ-1061
> URL: https://issues.apache.org/jira/browse/HAWQ-1061
> Project: Apache HAWQ
>  Issue Type: Sub-task
>  Components: Command Line Tools
>Affects Versions: 2.0.1.0-incubating
>Reporter: Lili Ma
>Assignee: hongwu
> Fix For: 2.0.1.0-incubating
>
>
> Fix the bugs found by the verification process:
> - Data loss when file locations include directories
> - Hash table registry consistent issue, which need to be check before 
> register. Need check distributed policy and bucket number besides files 
> number.
> - Register multiple files need to be rollback when there is some error before 
> done. It’s better to check source/target files exists and permissions.



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


[jira] [Updated] (HAWQ-1029) hawq register --help information not correct

2016-09-23 Thread hongwu (JIRA)

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

hongwu updated HAWQ-1029:
-
Affects Version/s: 2.0.1.0-incubating

> hawq register --help information not correct
> 
>
> Key: HAWQ-1029
> URL: https://issues.apache.org/jira/browse/HAWQ-1029
> Project: Apache HAWQ
>  Issue Type: Sub-task
>  Components: Command Line Tools
>Affects Versions: 2.0.1.0-incubating
>Reporter: Lili Ma
>Assignee: hongwu
> Fix For: 2.0.1.0-incubating
>
>
> The example for usage case 1 is not correct, should modify it.
> $ hawq register postgres parquet_table hdfs://localhost:8020/temp/hive.paq



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


[jira] [Resolved] (HAWQ-1024) Rollback if hawq register failed in process

2016-09-21 Thread hongwu (JIRA)

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

hongwu resolved HAWQ-1024.
--
Resolution: Implemented

> Rollback if hawq register failed in process
> ---
>
> Key: HAWQ-1024
> URL: https://issues.apache.org/jira/browse/HAWQ-1024
> Project: Apache HAWQ
>  Issue Type: Sub-task
>  Components: Command Line Tools
>Affects Versions: 2.0.1.0-incubating
>Reporter: hongwu
>Assignee: hongwu
> Fix For: 2.0.1.0-incubating
>
>
> Register multiple files need to be rollback when there is some error before 
> done. It’s better to check source/target files exists and permissions.
> 1. Create table.
> 2. Move files in HDFS.
> 3. Update metadata.
> When 1 fail, do nothing and catch the error.
> When 2 fail, rollback 2 partly, rollback 1.
> When 3 fail, rollback 2, rollback 1.
> Some case under --repair mode, for example delete files, can not rollback.



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


[jira] [Updated] (HAWQ-1024) Rollback if hawq register failed in process

2016-09-21 Thread hongwu (JIRA)

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

hongwu updated HAWQ-1024:
-
Description: 
Register multiple files need to be rollback when there is some error before 
done. It’s better to check source/target files exists and permissions.
1. Create table.
2. Move files in HDFS.
3. Update metadata.

When 1 fail, do nothing and catch the error.
When 2 fail, rollback 2 partly, rollback 1.
When 3 fail, rollback 2, rollback 1.

Some case under --repair mode, for example delete files, can not rollback.

  was:Register multiple files need to be rollback when there is some error 
before done. It’s better to check source/target files exists and permissions.


> Rollback if hawq register failed in process
> ---
>
> Key: HAWQ-1024
> URL: https://issues.apache.org/jira/browse/HAWQ-1024
> Project: Apache HAWQ
>  Issue Type: Sub-task
>  Components: Command Line Tools
>Affects Versions: 2.0.1.0-incubating
>Reporter: hongwu
>Assignee: hongwu
> Fix For: 2.0.1.0-incubating
>
>
> Register multiple files need to be rollback when there is some error before 
> done. It’s better to check source/target files exists and permissions.
> 1. Create table.
> 2. Move files in HDFS.
> 3. Update metadata.
> When 1 fail, do nothing and catch the error.
> When 2 fail, rollback 2 partly, rollback 1.
> When 3 fail, rollback 2, rollback 1.
> Some case under --repair mode, for example delete files, can not rollback.



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


[jira] [Updated] (HAWQ-1024) Rollback if hawq register failed in process

2016-09-20 Thread hongwu (JIRA)

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

hongwu updated HAWQ-1024:
-
Description: Register multiple files need to be rollback when there is some 
error before done. It’s better to check source/target files exists and 
permissions.

> Rollback if hawq register failed in process
> ---
>
> Key: HAWQ-1024
> URL: https://issues.apache.org/jira/browse/HAWQ-1024
> Project: Apache HAWQ
>  Issue Type: Sub-task
>  Components: Command Line Tools
>Affects Versions: 2.0.1.0-incubating
>Reporter: hongwu
>Assignee: hongwu
> Fix For: 2.0.1.0-incubating
>
>
> Register multiple files need to be rollback when there is some error before 
> done. It’s better to check source/target files exists and permissions.



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


  1   2   3   4   >