[ https://issues.apache.org/jira/browse/HIVE-27164?focusedWorklogId=855988&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-855988 ]
ASF GitHub Bot logged work on HIVE-27164: ----------------------------------------- Author: ASF GitHub Bot Created on: 11/Apr/23 02:24 Start Date: 11/Apr/23 02:24 Worklog Time Spent: 10m Work Description: sonarcloud[bot] commented on PR #4176: URL: https://github.com/apache/hive/pull/4176#issuecomment-1502599259 Kudos, SonarCloud Quality Gate passed! [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=4176) [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=4176&resolved=false&types=BUG) [![C](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/C-16px.png 'C')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=4176&resolved=false&types=BUG) [1 Bug](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=4176&resolved=false&types=BUG) [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=4176&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=4176&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=4176&resolved=false&types=VULNERABILITY) [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=4176&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=4176&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=4176&resolved=false&types=SECURITY_HOTSPOT) [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=4176&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=4176&resolved=false&types=CODE_SMELL) [11 Code Smells](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=4176&resolved=false&types=CODE_SMELL) [![No Coverage information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png 'No Coverage information')](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=4176&metric=coverage&view=list) No Coverage information [![No Duplication information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/NoDuplicationInfo-16px.png 'No Duplication information')](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=4176&metric=duplicated_lines_density&view=list) No Duplication information Issue Time Tracking ------------------- Worklog Id: (was: 855988) Time Spent: 3h (was: 2h 50m) > Create Temp Txn Table As Select is failing at tablePath validation > ------------------------------------------------------------------ > > Key: HIVE-27164 > URL: https://issues.apache.org/jira/browse/HIVE-27164 > Project: Hive > Issue Type: Bug > Components: HiveServer2, Metastore > Reporter: Naresh P R > Assignee: Venugopal Reddy K > Priority: Major > Labels: pull-request-available > Attachments: mm_cttas.q > > Time Spent: 3h > Remaining Estimate: 0h > > After HIVE-25303, every CTAS goes for > HiveMetaStore$HMSHandler#translate_table_dryrun() call to fetch table > location for CTAS queries which fails with following exception for temp > tables if MetastoreDefaultTransformer is set. > {code:java} > 2023-03-17 16:41:23,390 INFO > org.apache.hadoop.hive.metastore.MetastoreDefaultTransformer: > [pool-6-thread-196]: Starting translation for CreateTable for processor > HMSClient-@localhost with [EXTWRITE, EXTREAD, HIVEBUCKET2, HIVEFULLACIDREAD, > HIVEFULLACIDWRITE, HIVECACHEINVALIDATE, HIVEMANAGESTATS, > HIVEMANAGEDINSERTWRITE, HIVEMANAGEDINSERTREAD, HIVESQL, HIVEMQT, > HIVEONLYMQTWRITE] on table test_temp > 2023-03-17 16:41:23,392 ERROR > org.apache.hadoop.hive.metastore.RetryingHMSHandler: [pool-6-thread-196]: > MetaException(message:Illegal location for managed table, it has to be within > database's managed location) > at > org.apache.hadoop.hive.metastore.MetastoreDefaultTransformer.validateTablePaths(MetastoreDefaultTransformer.java:886) > at > org.apache.hadoop.hive.metastore.MetastoreDefaultTransformer.transformCreateTable(MetastoreDefaultTransformer.java:666) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.translate_table_dryrun(HiveMetaStore.java:2164) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) {code} > I am able to repro this issue using attached testcase. [^mm_cttas.q] > > There are multiple ways to fix this issue > * Have temp txn table path under db's managed location path. This will help > with encryption zone paths as well. > * Skip location check for temp tables at > MetastoreDefaultTransformer#validateTablePaths() -- This message was sent by Atlassian Jira (v8.20.10#820010)