lmhmhl commented on issue #8883:
URL: https://github.com/apache/shardingsphere/issues/8883#issuecomment-754677835
@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 by this way?
----------------------------------------------------------------
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]