Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abount Exception [Can not find owner from table.] #4810

Closed
phoema opened this issue Mar 17, 2020 · 10 comments
Closed

Abount Exception [Can not find owner from table.] #4810

phoema opened this issue Mar 17, 2020 · 10 comments

Comments

@phoema
Copy link

phoema commented Mar 17, 2020

Version
5.0.0-RC1-SNAPSHOT from master branch

Question

sorry, ref #4806 was closed timely
may be no user can see new message in it , so I open a new issue.

My
HintManager.clear();
HintManager hintManager = HintManager.getInstance();
hintManager.setDatabaseShardingValue(user.getTenantId());
it means
databaseShardingOnly = true;

if every table must be config,if not config then exception。
but my temp table name Alias will be not config in xml file.
like RES
it can be exception with 【Can not find owner from table.】
org.apache.shardingsphere.sql.parser.binder.segment.select.projection.engine.ProjectionsContextEngine

is this the same question with #4806 question ?

SELECT DISTINCT
RES.*
FROM
(
SELECT
SELF.*,
DEF.NAME_,
DEF.VERSION_
FROM
ACT_HI_PROCINST SELF
LEFT JOIN ACT_RE_PROCDEF DEF ON SELF.PROC_DEF_ID_ = DEF.ID_
WHERE
( 1 = 1 AND SELF.PROC_INST_ID_ = ? )
) RES
ORDER BY
RES.ID_ ASC
LIMIT ? OFFSET ?

@terrymanu
Copy link
Member

Can not support subquery now. I just set the issue as pending.

@phoema
Copy link
Author

phoema commented Mar 17, 2020

I run many subquery wiht new version from master and it works well.
now I see subquery is still developing in the git reop
may be some special case is not support now like this sql.
I will wait for.
Thanks very much.

@phoema
Copy link
Author

phoema commented Mar 18, 2020

SQL parse throws NullPointerException
may be it can be a test case.

SELECT
RES.*,
(
case
when
RES.TASK_ID_ is not null
and RES.EXECUTION_ID_ is not null
then EXECUTION.ACT_INST_ID_

when
  RES.CASE_EXECUTION_ID_ is not null
then RES.CASE_EXECUTION_ID_


  when
    EXECUTION.PARENT_ID_ is null
  and RES.IS_CONCURRENT_LOCAL_ = 0
  then EXECUTION.ID_


  when
    EXECUTION.IS_SCOPE_ = 1
    and EXECUTION.PARENT_ID_ is not null
  and RES.IS_CONCURRENT_LOCAL_ = 0
  then PARENT_EXECUTION.ACT_INST_ID_

  else EXECUTION.ACT_INST_ID_
end

) ACT_INST_ID_
FROM
ACT_RU_VARIABLE RES

LEFT JOIN
    ACT_RU_EXECUTION EXECUTION
ON
    RES.EXECUTION_ID_ = EXECUTION.ID_

LEFT JOIN
    ACT_RU_EXECUTION PARENT_EXECUTION
ON
    EXECUTION.PARENT_ID_ = PARENT_EXECUTION.ID_

WHERE
    TASK_ID_ = ?

@chenziwucodeing
Copy link

chenziwucodeing commented Jun 16, 2020

同样问题的案例 代码地址:
Cases of the same problem,code url:
https://github.com/chenziwucodeing/test_code_for_spring

@ChinaJeckXu
Copy link

I met the current problem, the impact of this problem is huge, I hope to fix it soon!

@miaogr86
Copy link

版本4.1.1也碰到这个问题

@chenziwucodeing
Copy link

我只用了读写分离功能出现。没用分库分表功能。

@418545106
Copy link

请问这个问题该如何解决

@strongduanmu
Copy link
Member

请问这个问题该如何解决

@418545106 You can try the master branch code, it has been fixed by PR #10363.

@terrymanu
Copy link
Member

The 5.0.0-beta version supports federation engine which can process subquery, please try it, thank you.

@terrymanu terrymanu added this to the 5.0.0-beta milestone Sep 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants