@Override public int hashCode() { return Objects.hash(super.hashCode(), timeGrain, logicalToPhysicalColumnNames, physicalToLogicalColumnNames); }
@Override public String toString() { return String.format("%s logicalToPhysicalNameMap: %s", super.toString(), logicalToPhysicalColumnNames); } }
/** * Get the names of the columns returned by getColumns method. * * @return linked hash set of column names in this schema */ public LinkedHashSet<String> getColumnNames() { return getColumns().stream() .map(Column::getName) .collect(Collectors.toCollection(LinkedHashSet::new)); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o instanceof PhysicalTableSchema) { PhysicalTableSchema that = (PhysicalTableSchema) o; return super.equals(o) && Objects.equals(timeGrain, that.timeGrain) && Objects.equals(logicalToPhysicalColumnNames, that.logicalToPhysicalColumnNames) && Objects.equals(physicalToLogicalColumnNames, that.physicalToLogicalColumnNames); } return false; }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof BaseSchema)) { return false; } BaseSchema that = (BaseSchema) o; return this.getClass() == o.getClass() && Objects.equals(columns, that.columns) && Objects.equals(granularity, that.getGranularity() ); }
/** * Get the names of the columns returned by getColumns method which are metric columns. * * @return linked hash set of column names in this schema */ public LinkedHashSet<String> getMetricColumnNames() { return getColumns(MetricColumn.class).stream() .map(Column::getName) .collect(Collectors.toCollection(LinkedHashSet::new)); }