public synchronized IQueryDataSource getSharedQueryDataSource() throws QueryProcessException {
    if (sharedQueryDataSource == null) {
      switch (queryDataSourceType) {
        case SERIES_SCAN:
          initQueryDataSource(sourcePaths);
          // Friendly for gc
          sourcePaths = null;
          break;
        case DEVICE_REGION_SCAN:
          initRegionScanQueryDataSource(devicePathsToContext);
          devicePathsToContext = null;
          break;
        case TIME_SERIES_REGION_SCAN:
          initRegionScanQueryDataSource(sourcePaths);
          sourcePaths = null;
          break;
        default:
          throw new QueryProcessException(
              "Unsupported query data source type: " + queryDataSourceType);
      }
    }
    return sharedQueryDataSource;
  }
return List of specific throwable and stack trace
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceContext.java