use of com.bakdata.conquery.models.query.queryplan.TableExportQueryPlan in project conquery by bakdata.
the class TableExportQuery method createQueryPlan.
@Override
public TableExportQueryPlan createQueryPlan(QueryPlanContext context) {
List<TableExportDescription> resolvedConnectors = new ArrayList<>();
for (CQUnfilteredTable table : tables) {
Connector connector = table.getTable();
// if no dateColumn is provided, we use the default instead which is always the first one.
// Set to null if none-available in the connector.
final Column validityDateColumn = findValidityDateColumn(connector, table.getDateColumn());
final TableExportDescription exportDescription = new TableExportDescription(connector.getTable(), validityDateColumn);
resolvedConnectors.add(exportDescription);
}
return new TableExportQueryPlan(query.createQueryPlan(context), CDateRange.of(dateRange), resolvedConnectors, positions);
}
Aggregations