lmhmhl commented on issue #8883:
URL: https://github.com/apache/shardingsphere/issues/8883#issuecomment-754680626


   ``` @Before
       public void setUp() throws Exception {
           Map<String, ShardingSphereMetaData> result = new HashMap<>();
           
getShardingSphereDataSource().getMetaDataContexts().getAllSchemaNames().forEach(e
 -> {
               ShardingSphereMetaData metaData = 
mock(ShardingSphereMetaData.class);
               when(metaData.getRuleMetaData()).thenReturn(new 
ShardingSphereRuleMetaData(Collections.emptyList(), Collections.emptyList()));
               result.put(e, metaData);
           });
           CalciteContextFactory calciteContextFactory = new 
CalciteContextFactory(result);
   
           CalciteContext calciteContext = 
calciteContextFactory.create("schema", mock(CalciteRowExecutor.class));
           calciteJDBCExecutor = new CalciteJDBCExecutor(calciteContext);
       }
   
   Is it right create calciteJDBCExecutor in this way? I am not very familiar 
with the source code, so I may  spend some time figure out the core of it and  
may be slow at begin. I hope someone can help me a little bit. thx.


----------------------------------------------------------------
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