[
https://issues.apache.org/jira/browse/HIVE-15249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15882403#comment-15882403
]
Mass Dosage commented on HIVE-15249:
------------------------------------
We're running Hive on EMR 5 which uses Hive 2.x. We are now completely blocked
on migrating some of our tables over to this since they have metadata (a json
serde schema) which when stored in the DB exceeds this value. In the past on
EMR 4 using Hive 1.x we did the (not ideal) workaround of increasing the size
in the underlying database but now that this check is also in Java code that
doesn't work any more. Ideally we'd like the types in the underlying DB to be
unbounded (i.e. TEXT) and then for any checks in the Java code to match what's
in the DB rather than having this implemented (and maintained) in two separate
places. Perhaps the Java code checks should be completely removed and the
checks just implemented in the DB?
> HIve 2.1.0 is throwing InvalidObjectException(message:Invalid column type
> name is too long
> ------------------------------------------------------------------------------------------
>
> Key: HIVE-15249
> URL: https://issues.apache.org/jira/browse/HIVE-15249
> Project: Hive
> Issue Type: Bug
> Components: Hive
> Reporter: vishal.rajan
>
> HIve 2.1.0 is throwing InvalidObjectException(message:Invalid column type
> name is too long
> If you go through MetaStoreUtils.java you can see MAX_MS_TYPENAME_LENGTH is
> hard coded to 2000, but this can be set to higher value in mysql.Table create
> doesn't happen , for tables with higher type length. Different users can
> change this variable based on different use cases/metastore if this can be a
> config variable.
> public static final int MAX_MS_TYPENAME_LENGTH = 2000;
> public static final String TYPE_FROM_DESERIALIZER = "<derived from
> deserializer>";
> /**
> * validate column type
> *
> * if it is predefined, yes. otherwise no
> * @param name
> * @return
> */
> static public String validateColumnType(String type) {
> if (type.equals(TYPE_FROM_DESERIALIZER)) return null;
> if (type.length() > MAX_MS_TYPENAME_LENGTH) {
> return "type name is too long: " + type;
> }
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)