[ https://issues.apache.org/jira/browse/HIVE-5814?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13983452#comment-13983452 ]
Erik Putrycz commented on HIVE-5814: ------------------------------------ I have Hortonworks 2.1, and a hive table with Timestamp fields fails with HCat: {code:sql} a = LOAD 'myTable2' using org.apache.hcatalog.pig.HCatLoader(); b = limit a 10; dump b; {code} {code:sql} CREATE TABLE myTable2( Barcode_Item_ID STRING, Process_Date_UTC TIMESTAMP, Process_TimeUTC TIMESTAMP) STORED AS orc {code} I replaced the JARs bundled with Hortonworks with the official 0.13 ones, and no change. According to the PDF document, the TIMESTAMP field should be mapped but here is the exception I get: {code:sql} 2014-04-28 15:32:54,864 [main] ERROR org.apache.pig.PigServer - exception during parsing: Error during parsing. Type timestamp not present Failed to parse: Type timestamp not present at org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:198) at org.apache.pig.PigServer$Graph.parseQuery(PigServer.java:1676) at org.apache.pig.PigServer$Graph.access$000(PigServer.java:1409) at org.apache.pig.PigServer.parseAndBuild(PigServer.java:342) at org.apache.pig.PigServer.executeBatch(PigServer.java:367) at org.apache.pig.PigServer.executeBatch(PigServer.java:353) at org.apache.pig.tools.grunt.GruntParser.executeBatch(GruntParser.java:140) at org.apache.pig.tools.grunt.GruntParser.processDump(GruntParser.java:769) at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:372) at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:198) at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:173) at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:84) at org.apache.pig.Main.run(Main.java:478) at org.apache.pig.Main.main(Main.java:156) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.hadoop.util.RunJar.main(RunJar.java:212) Caused by: java.lang.TypeNotPresentException: Type timestamp not present at org.apache.hcatalog.data.schema.HCatSchemaUtils.getPrimitiveHType(HCatSchemaUtils.java:176) at org.apache.hcatalog.data.schema.HCatSchemaUtils.getHCatFieldSchema(HCatSchemaUtils.java:126) at org.apache.hcatalog.data.schema.HCatSchemaUtils.getHCatFieldSchema(HCatSchemaUtils.java:119) at org.apache.hcatalog.common.HCatUtil.getHCatFieldSchemaList(HCatUtil.java:164) at org.apache.hcatalog.common.HCatUtil.getTableSchemaWithPtnCols(HCatUtil.java:197) at org.apache.hcatalog.pig.HCatLoader.getSchema(HCatLoader.java:197) at org.apache.pig.newplan.logical.relational.LOLoad.getSchemaFromMetaData(LOLoad.java:175) at org.apache.pig.newplan.logical.relational.LOLoad.<init>(LOLoad.java:89) at org.apache.pig.parser.LogicalPlanBuilder.buildLoadOp(LogicalPlanBuilder.java:853) at org.apache.pig.parser.LogicalPlanGenerator.load_clause(LogicalPlanGenerator.java:3479) at org.apache.pig.parser.LogicalPlanGenerator.op_clause(LogicalPlanGenerator.java:1536) at org.apache.pig.parser.LogicalPlanGenerator.general_statement(LogicalPlanGenerator.java:1013) at org.apache.pig.parser.LogicalPlanGenerator.statement(LogicalPlanGenerator.java:553) at org.apache.pig.parser.LogicalPlanGenerator.query(LogicalPlanGenerator.java:421) at org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:188) {code} > Add DATE, TIMESTAMP, DECIMAL, CHAR, VARCHAR types support in HCat > ----------------------------------------------------------------- > > Key: HIVE-5814 > URL: https://issues.apache.org/jira/browse/HIVE-5814 > Project: Hive > Issue Type: New Feature > Components: HCatalog > Affects Versions: 0.12.0 > Reporter: Eugene Koifman > Assignee: Eugene Koifman > Fix For: 0.13.0 > > Attachments: HCat-Pig Type Mapping Hive 0.13.pdf, HIVE-5814.2.patch, > HIVE-5814.3.patch, HIVE-5814.4.patch, HIVE-5814.5.patch > > > Hive 0.12 added support for new data types. Pig 0.12 added some as well. > HCat should handle these as well. Also note that CHAR was added recently. > Also allow user to specify a parameter in Pig like so HCatStorer('','', > '-onOutOfRangeValue Throw') to control what happens when Pig's value is out > of range for target Hive column. Valid values for the option are Throw and > Null. Throw - make the runtime raise an exception, Null, which is the > default, means NULL is written to target column and a message to that effect > is emitted to the log. Only 1 message per column/data type is sent to the > log. > See attached HCat-Pig Type Mapping Hive 0.13.pdf for exact mappings. -- This message was sent by Atlassian JIRA (v6.2#6252)