[ 
https://issues.apache.org/jira/browse/IMPALA-14340?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Fehr updated IMPALA-14340:
--------------------------------
    Description: 
When attempting to update/delete from a table with the same name as it's 
database, Impala throws a java.lang.IllegalStateException.

Sample Queries:

{noformat}
update tbl1.tbl1 set col1='a'
delete from tbl1.tbl1 where id=1
{noformat}


The issue is cause by [this 
precondition|https://github.com/apache/impala/blob/3910e924d406709419f654eb5af30e22da11f9c5/fe/src/main/java/org/apache/impala/analysis/ModifyStmt.java#L129]
 failing because there are two candidates instead of 1.  The two candidates 
are: "tbl1.tbl1" and "tbl1.tbl1.tbl1".

Full Stack Trace:

{noformat}
I20250821 15:52:02.703899 1848790 jni-util.cc:321] 
b942dd9465d1e9a3:df42f0a100000000] java.lang.IllegalStateException
        at 
com.google.common.base.Preconditions.checkState(Preconditions.java:496)
        at org.apache.impala.analysis.ModifyStmt.analyze(ModifyStmt.java:129)
        at 
org.apache.impala.analysis.AnalysisContext$AnalysisDriverImpl.analyze(AnalysisContext.java:576)
        at 
org.apache.impala.analysis.AnalysisContext.analyzeAndAuthorize(AnalysisContext.java:496)
        at 
org.apache.impala.service.Frontend.doCreateExecRequest(Frontend.java:2938)
        at 
org.apache.impala.service.Frontend.getTExecRequest(Frontend.java:2505)
        at 
org.apache.impala.service.Frontend.getTExecRequestWithFallback(Frontend.java:2374)
        at 
org.apache.impala.service.Frontend.createExecRequest(Frontend.java:2063)
        at 
org.apache.impala.service.JniFrontend.createExecRequest(JniFrontend.java:176)
I20250821 15:52:02.704031 1848790 status.cc:129] 
b942dd9465d1e9a3:df42f0a100000000] IllegalStateException: null
    @          0x320114d  impala::Status::Status()
    @          0x446524b  impala::JniUtil::GetJniExceptionMsg()
    @          0x41903c0  impala::JniCall::Call<>()
    @          0x416ec7b  impala::Frontend::GetExecRequest()
    @          0x3f2c121  impala::QueryDriver::DoFrontendPlanning()
    @          0x3f2c2db  impala::QueryDriver::RunFrontendPlanner()
    @          0x42518e7  impala::ImpalaServer::ExecuteInternal()
    @          0x42527a3  impala::ImpalaServer::Execute()
    @          0x41dffbd  impala::ImpalaServer::ExecuteStatementCommon()
    @          0x41e13a5  impala::ImpalaServer::ExecuteStatement()
    @          0x42ced4d  
apache::hive::service::cli::thrift::TCLIServiceProcessorT<>::process_ExecuteStatement()
    @          0x430aa2f  
apache::hive::service::cli::thrift::TCLIServiceProcessorT<>::dispatchCall()
    @          0x430afd4  
impala::ImpalaHiveServer2ServiceProcessorT<>::dispatchCall()
    @          0x31046b9  apache::thrift::TDispatchProcessor::process()
    @          0x3dce6fd  
apache::thrift::server::TAcceptQueueServer::Task::run()
    @          0x3de616b  impala::ThriftThread::RunRunnable()
    @          0x3de71a2  
boost::detail::function::void_function_obj_invoker0<>::invoke()
    @          0x4543e2c  impala::Thread::SuperviseThread()
    @          0x4544931  boost::detail::thread_data<>::run()
    @          0x46cdc07  thread_proxy
    @     0x7efc2e104609  start_thread
    @     0x7efc2c11c353  clone
    @              (nil)  (unknown)
{noformat}


  was:
When attempting to update a table with the same name as it's database, Impala 
throws a java.lang.IllegalStateException.

Sample Query:

{noformat}
update tbl1.tbl1 set col1='a'
{noformat}


The issue is cause by [this 
precondition|https://github.com/apache/impala/blob/3910e924d406709419f654eb5af30e22da11f9c5/fe/src/main/java/org/apache/impala/analysis/ModifyStmt.java#L129]
 failing because there are two candidates instead of 1.  The two candidates 
are: "tbl1.tbl1" and "tbl1.tbl1.tbl1".

Full Stack Trace:

{noformat}
I20250821 15:52:02.703899 1848790 jni-util.cc:321] 
b942dd9465d1e9a3:df42f0a100000000] java.lang.IllegalStateException
        at 
com.google.common.base.Preconditions.checkState(Preconditions.java:496)
        at org.apache.impala.analysis.ModifyStmt.analyze(ModifyStmt.java:129)
        at 
org.apache.impala.analysis.AnalysisContext$AnalysisDriverImpl.analyze(AnalysisContext.java:576)
        at 
org.apache.impala.analysis.AnalysisContext.analyzeAndAuthorize(AnalysisContext.java:496)
        at 
org.apache.impala.service.Frontend.doCreateExecRequest(Frontend.java:2938)
        at 
org.apache.impala.service.Frontend.getTExecRequest(Frontend.java:2505)
        at 
org.apache.impala.service.Frontend.getTExecRequestWithFallback(Frontend.java:2374)
        at 
org.apache.impala.service.Frontend.createExecRequest(Frontend.java:2063)
        at 
org.apache.impala.service.JniFrontend.createExecRequest(JniFrontend.java:176)
I20250821 15:52:02.704031 1848790 status.cc:129] 
b942dd9465d1e9a3:df42f0a100000000] IllegalStateException: null
    @          0x320114d  impala::Status::Status()
    @          0x446524b  impala::JniUtil::GetJniExceptionMsg()
    @          0x41903c0  impala::JniCall::Call<>()
    @          0x416ec7b  impala::Frontend::GetExecRequest()
    @          0x3f2c121  impala::QueryDriver::DoFrontendPlanning()
    @          0x3f2c2db  impala::QueryDriver::RunFrontendPlanner()
    @          0x42518e7  impala::ImpalaServer::ExecuteInternal()
    @          0x42527a3  impala::ImpalaServer::Execute()
    @          0x41dffbd  impala::ImpalaServer::ExecuteStatementCommon()
    @          0x41e13a5  impala::ImpalaServer::ExecuteStatement()
    @          0x42ced4d  
apache::hive::service::cli::thrift::TCLIServiceProcessorT<>::process_ExecuteStatement()
    @          0x430aa2f  
apache::hive::service::cli::thrift::TCLIServiceProcessorT<>::dispatchCall()
    @          0x430afd4  
impala::ImpalaHiveServer2ServiceProcessorT<>::dispatchCall()
    @          0x31046b9  apache::thrift::TDispatchProcessor::process()
    @          0x3dce6fd  
apache::thrift::server::TAcceptQueueServer::Task::run()
    @          0x3de616b  impala::ThriftThread::RunRunnable()
    @          0x3de71a2  
boost::detail::function::void_function_obj_invoker0<>::invoke()
    @          0x4543e2c  impala::Thread::SuperviseThread()
    @          0x4544931  boost::detail::thread_data<>::run()
    @          0x46cdc07  thread_proxy
    @     0x7efc2e104609  start_thread
    @     0x7efc2c11c353  clone
    @              (nil)  (unknown)
{noformat}



> Cannot Update Table with Same Name as Database
> ----------------------------------------------
>
>                 Key: IMPALA-14340
>                 URL: https://issues.apache.org/jira/browse/IMPALA-14340
>             Project: IMPALA
>          Issue Type: Bug
>    Affects Versions: Impala 5.0.0
>            Reporter: Jason Fehr
>            Priority: Critical
>
> When attempting to update/delete from a table with the same name as it's 
> database, Impala throws a java.lang.IllegalStateException.
> Sample Queries:
> {noformat}
> update tbl1.tbl1 set col1='a'
> delete from tbl1.tbl1 where id=1
> {noformat}
> The issue is cause by [this 
> precondition|https://github.com/apache/impala/blob/3910e924d406709419f654eb5af30e22da11f9c5/fe/src/main/java/org/apache/impala/analysis/ModifyStmt.java#L129]
>  failing because there are two candidates instead of 1.  The two candidates 
> are: "tbl1.tbl1" and "tbl1.tbl1.tbl1".
> Full Stack Trace:
> {noformat}
> I20250821 15:52:02.703899 1848790 jni-util.cc:321] 
> b942dd9465d1e9a3:df42f0a100000000] java.lang.IllegalStateException
>         at 
> com.google.common.base.Preconditions.checkState(Preconditions.java:496)
>         at org.apache.impala.analysis.ModifyStmt.analyze(ModifyStmt.java:129)
>         at 
> org.apache.impala.analysis.AnalysisContext$AnalysisDriverImpl.analyze(AnalysisContext.java:576)
>         at 
> org.apache.impala.analysis.AnalysisContext.analyzeAndAuthorize(AnalysisContext.java:496)
>         at 
> org.apache.impala.service.Frontend.doCreateExecRequest(Frontend.java:2938)
>         at 
> org.apache.impala.service.Frontend.getTExecRequest(Frontend.java:2505)
>         at 
> org.apache.impala.service.Frontend.getTExecRequestWithFallback(Frontend.java:2374)
>         at 
> org.apache.impala.service.Frontend.createExecRequest(Frontend.java:2063)
>         at 
> org.apache.impala.service.JniFrontend.createExecRequest(JniFrontend.java:176)
> I20250821 15:52:02.704031 1848790 status.cc:129] 
> b942dd9465d1e9a3:df42f0a100000000] IllegalStateException: null
>     @          0x320114d  impala::Status::Status()
>     @          0x446524b  impala::JniUtil::GetJniExceptionMsg()
>     @          0x41903c0  impala::JniCall::Call<>()
>     @          0x416ec7b  impala::Frontend::GetExecRequest()
>     @          0x3f2c121  impala::QueryDriver::DoFrontendPlanning()
>     @          0x3f2c2db  impala::QueryDriver::RunFrontendPlanner()
>     @          0x42518e7  impala::ImpalaServer::ExecuteInternal()
>     @          0x42527a3  impala::ImpalaServer::Execute()
>     @          0x41dffbd  impala::ImpalaServer::ExecuteStatementCommon()
>     @          0x41e13a5  impala::ImpalaServer::ExecuteStatement()
>     @          0x42ced4d  
> apache::hive::service::cli::thrift::TCLIServiceProcessorT<>::process_ExecuteStatement()
>     @          0x430aa2f  
> apache::hive::service::cli::thrift::TCLIServiceProcessorT<>::dispatchCall()
>     @          0x430afd4  
> impala::ImpalaHiveServer2ServiceProcessorT<>::dispatchCall()
>     @          0x31046b9  apache::thrift::TDispatchProcessor::process()
>     @          0x3dce6fd  
> apache::thrift::server::TAcceptQueueServer::Task::run()
>     @          0x3de616b  impala::ThriftThread::RunRunnable()
>     @          0x3de71a2  
> boost::detail::function::void_function_obj_invoker0<>::invoke()
>     @          0x4543e2c  impala::Thread::SuperviseThread()
>     @          0x4544931  boost::detail::thread_data<>::run()
>     @          0x46cdc07  thread_proxy
>     @     0x7efc2e104609  start_thread
>     @     0x7efc2c11c353  clone
>     @              (nil)  (unknown)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to