[
https://issues.apache.org/jira/browse/TAJO-618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13909983#comment-13909983
]
Jaehwa Jung commented on TAJO-618:
----------------------------------
Maximum identifier length on common RDBMS is as follows:
||RDBMS||Table Name Max Length||Column Name Max Length||
|DB2|128|128|
|Derby|128|128|
|MySQL|128|128|
|Oracle|30|30|
|PostgreSQL|31|31|
|Sap DB|32|32|
|SQL Server|128|128|
|Sybase|30|30|
This is determined by DBMS configuration. For example, in PostgreSQL, It is
determined as one less than the value of NAMEDATALEN when building the server.
The default value of NAMEDATALEN is 64.
(http://www.postgresql.org/docs/9.3/static/runtime-config-preset.html)
For reference, the table name and column name length of hive is 128 for Derby,
MySQL, PostgreSQL.
> Catalog column length is too long.
> ----------------------------------
>
> Key: TAJO-618
> URL: https://issues.apache.org/jira/browse/TAJO-618
> Project: Tajo
> Issue Type: Bug
> Components: catalog
> Affects Versions: 0.8-incubating, 1.0-incubating
> Reporter: Jaehwa Jung
> Assignee: Jaehwa Jung
> Fix For: 0.8-incubating, 1.0-incubating
>
>
> If users use MySQLStore, one of them can finds a bug according to their mysql
> configuration as follows:
> {code:xml}
> ERROR store.MySQLStore (AbstractDBStore.java:<init>(124)) - Failed to create
> the base tables caused by
> com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Specified key was
> too long; max key length is 1000 bytestrying to drop base table
> {code}
> It will be happened by a table called COLUMNS. It uses unique key which
> consists of TABLE_ID and column_name, and these two columns have 255
> characters. Each column characters doesn’t matter, but it would be lack for
> unique key according to mysql configuration.
> If mysql characterset is UTF8, total key length for unique key will be
> calculated in this way - (255 + 255) * 3 = 1,530. At the result, it will
> exceed max limit value such as 1000 byte.
> We need to update these columns length. So, I wish to update these columns as
> follows:
> * TABLE_ID: varchar(128)
> * column_name: varchar(128)
> For reference, I borrowed from hive metastore schema. And if we update
> COLUMNS table, we should other tables which use TABLE_ID. I also think that
> DerbyStore needs to update by this issue.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)