Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To generate golden answer files, you need to setup your development environment according to this as follows.

  1. Download Hive's 0.13.1 release and set HIVE_HOME.

  2. Download all 0.13.1a jars from http://mvnrepository.com/artifact/org.spark-project.hive and replace corresponding jars in $HIVE_HOME/lib.
  3. Download kryo 2.21.jar to $HIVE_HOME/lib (Note: 2.22 jar does not work).
  4. You may not need this step. But, if a Hive query fails and you find that Hive tries to talk to HDFS or you find weird runtime NPEs, set the following in your test suite...

  

Code Block
languagescala
val testTempDir = Utils.createTempDir()
// We have to use kryo to let Hive correctly serialize some plans.
sql("set hive.plan.serialization.format=kryo")
// Explicitly set fs to local fs.
sql(s"set fs.default.name=file://$testTempDir/")
//sql(s"set mapred.working.dir=${testTempDir}")
// Ask Hive to run jobs in-process as a single map and reduce task.
sql("set mapred.job.tracker=local")

 

README. After running the new test cases for the first time, golden answer files should be found under the sql/hive/src/test/resources/golden folder.