guimingyue commented on issue #8284:
URL: https://github.com/apache/shardingsphere/issues/8284#issuecomment-737624290


   > @guimingyue @tristaZero
   > I fix it.
   > 
[tristaZero/federatedSQL#2](https://github.com/tristaZero/federatedSQL/pull/2)
   
   @junwen12221 I add the  VM options you mentioned in 
https://github.com/tristaZero/federatedSQL/pull/2,and I found the line throwed 
the NPE,It‘s 
`root.getRootSchema().getSubSchema("sharding").getTable("t_order")`。
   @tristaZero 
   This is because the sharding sub schema you defined in the constructor 
method `CalciteRowExecutor` is assigned to `CalciteRawExecutor#schema` 
field。Then the `DataContext` object with the same sub schema is binded to 
`executablePlan`,so, this invocation `root.getRootSchema()`  in generated code 
returned the sharding  sub schema which does not have any sub schema.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to