Todd Lipcon has submitted this change and it was merged. ( )

Change subject: IMPALA-7439. CREATE DATABASE creates a catalog entry with 
missing location

IMPALA-7439. CREATE DATABASE creates a catalog entry with missing location

Previously, when creating a new database, the CatalogOpExecutor would
create an HMS Database object, issue the HMS createDatabase call, and
then create a Catalog entry from that same Database object. The
resulting Catalog entry would be missing certain fields that are
auto-created by the HMS itself, most importantly the location field.

The code for CTAS seems to have contained a workaround for this issue
ever since catalogd was first introduced: rather than using the location
stored in the Db object, it would re-fetch the Database from HMS.

Now that this is fixed, that workaround could be removed and some code

A new test verifies that a newly-created database has the appropriate
location, and existing CTAS tests verify that functionality didn't

Change-Id: I13df31cee1e5768b073e0e35c4c16ebf1892be23
Reviewed-by: Vuk Ercegovac <>
Tested-by: Impala Public Jenkins <>
M fe/src/main/java/org/apache/impala/analysis/
M fe/src/main/java/org/apache/impala/catalog/
M fe/src/main/java/org/apache/impala/catalog/
M fe/src/main/java/org/apache/impala/catalog/local/
M fe/src/main/java/org/apache/impala/service/
M testdata/workloads/functional-query/queries/QueryTest/create-database.test
6 files changed, 36 insertions(+), 50 deletions(-)

  Vuk Ercegovac: Looks good to me, approved
  Impala Public Jenkins: Verified

To view, visit
To unsubscribe, visit

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I13df31cee1e5768b073e0e35c4c16ebf1892be23
Gerrit-Change-Number: 11229
Gerrit-PatchSet: 2
Gerrit-Owner: Todd Lipcon <>
Gerrit-Reviewer: Bharath Vissapragada <>
Gerrit-Reviewer: Impala Public Jenkins <>
Gerrit-Reviewer: Tianyi Wang <>
Gerrit-Reviewer: Todd Lipcon <>
Gerrit-Reviewer: Vuk Ercegovac <>

Reply via email to