----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/26403/ -----------------------------------------------------------
(Updated Oct. 9, 2014, 12:51 a.m.) Review request for hive. Changes ------- 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 https://issues.apache.org/jira/browse/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/HiveSchemaHelper.java a21fa652e9c1aa3fd763afa4136f6fcb7c7b7459 beeline/src/java/org/apache/hive/beeline/HiveSchemaTool.java c376687cb47332323912e4c6dbe713b7b37ae834 itests/hive-unit/src/test/java/org/apache/hive/beeline/TestSchemaTool.java 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/MetaStoreSchemaInfo.java af56ef6a7c6e27ead312a68d30d94802095f2c60 Diff: https://reviews.apache.org/r/26403/diff/ Testing ------- Added unit test Thanks, Mohit Sabharwal