title: Sqoop import --as-parquetfile from Oracle gets wrong file types
body: <p>I am using CDH 5.5 with Sqoop 1.4.6 and Hive 1.2.1 (which I manually downloaded to get the Parquet support for additional data types)</p>
  
  <p>Here is the import command I'm using:</p>
  
  <pre><code>sqoop import --connect jdbc:oracle:thin:@database:port:name --username username --password password --table SHARE_PROPERTY -m 1 --null-string '\\N' --null-non-string '\\N'  --hive-import --hive-table SHARE_PROPERTY --as-parquetfile --compression-codec snappy --map-column-hive "CREATE_DATE=String"
  </code></pre>
  
  <p>The command successfully completes, and when I describe the table in Hive I see:</p>
  
  <pre><code>hive&gt; describe share_property;
  OK
  share_property_id       string                                      
  customer_id             string                                      
  website_user_id         string                                      
  address_id              string                                      
  listing_num             string                                      
  source                  string                                      
  is_facebook             string                                      
  is_twitter              string                                      
  is_linkedin             string                                      
  is_email                string                                      
  create_date             string                                      
  Time taken: 1.09 seconds, Fetched: 11 row(s)
  </code></pre>
  
  <p>Most of these fields are actually Oracle <code>NUMBER</code> types, and are imported as <code>double</code> if I stop trying to import a parquet file and just use the default text file.  The create_date field is a DATE in Oracle, and is sometimes imported as a bigint, and sometimes as a string depending on the command I use.</p>
  
  <p>In any case, when I try to query this data in Hive, I run into this error:</p>
  
  <pre><code>hive&gt; select * from share_property limit 20;
  OK
  SLF4J: Class path contains multiple SLF4J bindings.
  SLF4J: Found binding in [jar:file:/usr/lib/parquet/lib/parquet-format-2.1.0-cdh5.5.1.jar!/shaded/parquet/org/slf4j/impl/StaticLoggerBinder.class]
  SLF4J: Found binding in [jar:file:/usr/lib/parquet/lib/parquet-pig-bundle-1.5.0-cdh5.5.1.jar!/shaded/parquet/org/slf4j/impl/StaticLoggerBinder.class]
  SLF4J: Found binding in [jar:file:/usr/lib/parquet/lib/parquet-hadoop-bundle-1.5.0-cdh5.5.1.jar!/shaded/parquet/org/slf4j/impl/StaticLoggerBinder.class]
  SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
  SLF4J: Actual binding is of type [shaded.parquet.org.slf4j.helpers.NOPLoggerFactory]
  Exception in thread "main" java.lang.NoSuchMethodError: parquet.schema.Types$MessageTypeBuilder.addFields([Lparquet/schema/Type;)Lparquet/schema/Types$GroupBuilder;
  at org.apache.hadoop.hive.ql.io.parquet.read.DataWritableReadSupport.getSchemaByName(DataWritableReadSupport.java:159)
  at org.apache.hadoop.hive.ql.io.parquet.read.DataWritableReadSupport.init(DataWritableReadSupport.java:222)
  at org.apache.hadoop.hive.ql.io.parquet.read.ParquetRecordReaderWrapper.getSplit(ParquetRecordReaderWrapper.java:256)
  at org.apache.hadoop.hive.ql.io.parquet.read.ParquetRecordReaderWrapper.&lt;init&gt;(ParquetRecordReaderWrapper.java:99)
  at org.apache.hadoop.hive.ql.io.parquet.read.ParquetRecordReaderWrapper.&lt;init&gt;(ParquetRecordReaderWrapper.java:85)
  at org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat.getRecordReader(MapredParquetInputFormat.java:72)
  at org.apache.hadoop.hive.ql.exec.FetchOperator$FetchInputFormatSplit.getRecordReader(FetchOperator.java:673)
  at org.apache.hadoop.hive.ql.exec.FetchOperator.getRecordReader(FetchOperator.java:323)
  at org.apache.hadoop.hive.ql.exec.FetchOperator.getNextRow(FetchOperator.java:445)
  at org.apache.hadoop.hive.ql.exec.FetchOperator.pushRow(FetchOperator.java:414)
  at org.apache.hadoop.hive.ql.exec.FetchTask.fetch(FetchTask.java:140)
  at org.apache.hadoop.hive.ql.Driver.getResults(Driver.java:1670)
  at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:233)
  at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:165)
  at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:376)
  at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:736)
  at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:681)
  at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:621)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
  at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
  </code></pre>
  
  <p>Obviously the data is not being imported correctly, or parquet is having trouble.  If I import as a text file I can successfully query the data (as long as I set <code>--map-column-hive CREATE_DATE=String</code>, otherwise it imports as a long), but if I try to insert that data into a parquet table to convert the formats, it also errors out.  So maybe the error is there?  I've tried manually setting all of the column types with <code>--map-column-hive</code> and <code>--map-column-java</code>, but that doesn't seem to help either</p>
  
  <p>In addition, I've found documentation saying that Sqoop supports importing the Oracle <code>DATE</code> type, and that Parquet supports Date/Timestamp, but I can't get it to successfully import as either one (using <code>--map-column-hive</code> or <code>--map-column-java</code> or <code>-Doraoop.timestamp.string=false</code> with the <code>--direct</code> option)</p>
  
  <p>I get the feeling that there's some documentation that I'm missing or just can't find.  Has anybody else seen this?</p>