hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mohit Sabharwal" <>
Subject Re: Review Request 26403: HIVE-8374: schematool fails on Postgres versions < 9.2
Date Thu, 09 Oct 2014 00:51:00 GMT

This is an automatically generated e-mail. To reply, visit:

(Updated Oct. 9, 2014, 12:51 a.m.)

Review request for hive.


Instead of having the user supply an option dependent on Postgres
version, changed to the patch to automatically run a "pre-upgrade"
script that creates the language, but any error is ignored.

Kept the dbOpts option as that is useful when we add any 
db specific options.

Bugs: HIVE-8374

Repository: hive-git

Description (updated)

HIVE-8374: schematool fails on Postgres versions < 9.2

The upgrade script for HIVE-5700 creates an UDF with language 'plpgsql',
which is available by default only for Postgres 9.2+.

For older Postgres versions, the language must be explicitly created,
otherwise schematool fails.

This patch allows for running "pre-upgrade" scripts before running a
upgrade script. The errors from pre-upgrade scripts are ignored.
This enables us to run statements like "create language" as a
pre-upgrade step and ignore failures.

This patch also adds a command line option to schematool to specify
db options. This will be useful for adding future options that
can conditionally execute certain statements.

Diffs (updated)

  beeline/src/java/org/apache/hive/beeline/ a21fa652e9c1aa3fd763afa4136f6fcb7c7b7459

  beeline/src/java/org/apache/hive/beeline/ c376687cb47332323912e4c6dbe713b7b37ae834

  itests/hive-unit/src/test/java/org/apache/hive/beeline/ 749fb9e86b4f74f768da356cf82f621fdef399cd

  metastore/scripts/upgrade/postgres/015-HIVE-5700.postgres.sql aedb2b5dbf9b513cb7c124f59e05ea9831455a72

  metastore/scripts/upgrade/postgres/pre-0-upgrade-0.12.0-to-0.13.0.postgres.sql PRE-CREATION

  metastore/src/java/org/apache/hadoop/hive/metastore/ af56ef6a7c6e27ead312a68d30d94802095f2c60



Added unit test


Mohit Sabharwal

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message