You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Terje Marthinussen <tm...@gmail.com> on 2010/12/21 14:06:30 UTC

alter table bypasses regexSerDe checks

Hi,

I made HIVE-1850 a week ago, but I just realized that of course, this is a
bit more generic. Any alter table operation may put hive in a state which
you cannot get out of today.

For instance, I just added a column which was type INT to a table. As a
result, I know get:
FAILED: Hive Internal Error:
java.lang.RuntimeException(MetaException(message:org.apache.hadoop.hive.serde2.SerDeException
org.apache.hadoop.hive.contrib.serde2.RegexSerDe only accepts string
columns, but column[10] named rtime has type int))
java.lang.RuntimeException:
MetaException(message:org.apache.hadoop.hive.serde2.SerDeException
org.apache.hadoop.hive.contrib.serde2.RegexSerDe only accepts string
columns, but column[10] named rtime has type int)
at org.apache.hadoop.hive.ql.metadata.Table.getDeserializer(Table.java:255)
at org.apache.hadoop.hive.ql.metadata.Table.getCols(Table.java:484)
at org.apache.hadoop.hive.ql.metadata.Table.checkValidity(Table.java:161)
at org.apache.hadoop.hive.ql.metadata.Hive.getTable(Hive.java:803)
at
org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeAlterTableRenameCol(DDLSemanticAnalyzer.java:1181)
at
org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeInternal(DDLSemanticAnalyzer.java:225)
at
org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:238)
at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:335)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:686)
at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:142)
at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:216)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:370)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
Caused by:
MetaException(message:org.apache.hadoop.hive.serde2.SerDeException
org.apache.hadoop.hive.contrib.serde2.RegexSerDe only accepts string
columns, but column[10] named rtime has type int)
at
org.apache.hadoop.hive.metastore.MetaStoreUtils.getDeserializer(MetaStoreUtils.java:207)
at org.apache.hadoop.hive.ql.metadata.Table.getDeserializer(Table.java:253)
... 16 more

Before hacking code to fix, is there something I am missing in terms of how
it is possible to recover from something like this (short of playing with
the metadatabase)

Regards,
Terje