You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hawq.apache.org by "hongwu (JIRA)" <ji...@apache.org> on 2016/11/22 06:54:59 UTC
[jira] [Resolved] (HAWQ-1167) Parquet format table estimate column
width meets error for bpchar type
[ https://issues.apache.org/jira/browse/HAWQ-1167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
hongwu resolved HAWQ-1167.
--------------------------
Resolution: Fixed
Fix Version/s: 2.0.1.0-incubating
> 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.0.1.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)