You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/01/05 17:38:39 UTC

[GitHub] [shardingsphere] lmhmhl edited a comment on issue #8883: Create unit test for `CalciteJDBCExecutor` to test SQL federation feature

lmhmhl edited a comment on issue #8883:
URL: https://github.com/apache/shardingsphere/issues/8883#issuecomment-754682567


   ```
    @Before
       public void setUp() throws Exception {
           Map<String, ShardingSphereMetaData> result = new HashMap<>();
           MetaDataContexts metaDataContexts = getShardingSphereDataSource().getMetaDataContexts();
           metaDataContexts.getAllSchemaNames().forEach(e ->
                   result.put(e, metaDataContexts.getMetaData(e))
           );
           CalciteContextFactory calciteContextFactory = new CalciteContextFactory(result);
           CalciteContext calciteContext = calciteContextFactory.create("t_user", mock(CalciteRowExecutor.class));
           calciteJDBCExecutor = new CalciteJDBCExecutor(calciteContext);
       }
   ```
   Is it right create `calciteJDBCExecutor` in  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:
users@infra.apache.org