Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Sqoop, mail # dev - Review Request: SQOOP-489 Cannot define partition keys for Hive tables created through Sqoop


Copy link to this message
-
Re: Review Request: SQOOP-489 Cannot define partition keys for Hive tables created through Sqoop
Cheolsoo Park 2012-05-30, 03:09

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/5291/
-----------------------------------------------------------

(Updated 2012-05-30 03:09:24.915356)
Review request for Sqoop and Jarek Cecho.
Summary (updated)
-------

If partition key is set to an importing column for Hive import, Sqoop generates ill-formed queries.

However, Sqoop should rather print a proper warning message.
This addresses bug SQOOP-489.
    https://issues.apache.org/jira/browse/SQOOP-489
Diffs
-----

  /src/test/com/cloudera/sqoop/hive/TestHiveImport.java 1344075
  /src/java/org/apache/sqoop/hive/TableDefWriter.java 1344075

Diff: https://reviews.apache.org/r/5291/diff
Testing
-------

1) Ran ant test, test -Dthirdparty=true, and checkstyle.

2) Added the following unit test:

Given a table foo that has columns x, y, and z,

a) sqoop import --table foo --hive-import --hive-partition-key x

b) sqoop import --table foo --columns x --hive-import --hive-partition-key x

c) sqoop create-hive-table --table foo --hive-partition-key x
Thanks,

Cheolsoo