public Schema toSerializableForm() { for (Table table : getTables()) { table.getColumns(); table.getIndexedColumns(); table.getPrimaryKeys(); } loadRelations(); return this; }
public Schema toSerializableForm() { for (Table table : getTables()) { table.getColumns(); table.getIndexedColumns(); table.getPrimaryKeys(); } loadRelations(); return this; }
Column[] primaryKeyColumns = _table.getPrimaryKeys(); if (primaryKeyColumns == null || primaryKeyColumns.length == 0) { logger.info("No primary keys defined for table {}, not pre-selecting primary keys", _table.getName());
/** * Inspects the row processed tables primary keys. If all primary keys are * in the source columns of the AnalysisJob, they will be added to the * physically queried columns. * * Adding the primary keys to the query is a trade-off: It helps a lot in * making eg. annotated rows referenceable to the source table, but it may * also potentially make the job heavier to execute since a lot of (unique) * values will be retrieved. */ public void addPrimaryKeysIfSourced() { final List<Column> primaryKeyColumns = getTable().getPrimaryKeys(); if (primaryKeyColumns == null || primaryKeyColumns.isEmpty()) { logger.info("No primary keys defined for table {}, not pre-selecting primary keys", getTable().getName()); return; } final Collection<InputColumn<?>> sourceInputColumns = getAnalysisJob().getSourceColumns(); final List<Column> sourceColumns = CollectionUtils.map(sourceInputColumns, InputColumn::getPhysicalColumn); for (final Column primaryKeyColumn : primaryKeyColumns) { if (!sourceColumns.contains(primaryKeyColumn)) { logger.info("Primary key column {} not added to source columns, not pre-selecting primary keys"); return; } } addPhysicalColumns(primaryKeyColumns); }
final List<Column> primaryKeys = sourceTable.getPrimaryKeys(); if (primaryKeys.size() == 1) { final Column primaryKey = primaryKeys.get(0);
final Column[] primaryKeys = sourceTable.getPrimaryKeys(); if (primaryKeys.length == 1) { final Column primaryKey = primaryKeys[0];