hawq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lili Ma (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HAWQ-1167) Parquet format table estimate column width meets error for bpchar type
Date Mon, 21 Nov 2016 11:02:58 GMT
Lili Ma created HAWQ-1167:
-----------------------------

             Summary: 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: Lei Chang


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)

Mime
View raw message