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

Ed Espino resolved HAWQ-1167.
-----------------------------
    Resolution: Fixed

> 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
>             Fix For: 2.1.0.0-incubating
>
>
> 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)

Reply via email to