public boolean canSkipValue(ColumnDefinition column) { return columnsToFetch != null && !columnsToFetch.fetchedColumnIsQueried(column); }
public boolean canSkipValue(ColumnDefinition column) { return columnsToFetch != null && !columnsToFetch.fetchedColumnIsQueried(column); }
public boolean canSkipValue(ColumnDefinition column) { return columnsToFetch != null && !columnsToFetch.fetchedColumnIsQueried(column); }
public boolean canSkipValue(ColumnDefinition column) { return columnsToFetch != null && !columnsToFetch.fetchedColumnIsQueried(column); }
public Row withOnlyQueriedData(ColumnFilter filter) { if (filter.allFetchedColumnsAreQueried()) return this; return transformAndFilter(primaryKeyLivenessInfo, deletion, (cd) -> { ColumnDefinition column = cd.column(); if (column.isComplex()) return ((ComplexColumnData)cd).withOnlyQueriedData(filter); return filter.fetchedColumnIsQueried(column) ? cd : null; }); }
public Row withOnlyQueriedData(ColumnFilter filter) { if (filter.allFetchedColumnsAreQueried()) return this; return transformAndFilter(primaryKeyLivenessInfo, deletion, (cd) -> { ColumnDefinition column = cd.column(); if (column.isComplex()) return ((ComplexColumnData)cd).withOnlyQueriedData(filter); return filter.fetchedColumnIsQueried(column) ? cd : null; }); }
public Row withOnlyQueriedData(ColumnFilter filter) { if (filter.allFetchedColumnsAreQueried()) return this; return transformAndFilter(primaryKeyLivenessInfo, deletion, (cd) -> { ColumnDefinition column = cd.column(); if (column.isComplex()) return ((ComplexColumnData)cd).withOnlyQueriedData(filter); return filter.fetchedColumnIsQueried(column) ? cd : null; }); }
private boolean isQueried(Cell cell) { // When we read, we may have some cell that have been fetched but are not selected by the user. Those cells may // have empty values as optimization (see CASSANDRA-10655) and hence they should not be included in the read-repair. // This is fine since those columns are not actually requested by the user and are only present for the sake of CQL // semantic (making sure we can always distinguish between a row that doesn't exist from one that do exist but has /// no value for the column requested by the user) and so it won't be unexpected by the user that those columns are // not repaired. ColumnDefinition column = cell.column(); ColumnFilter filter = command.columnFilter(); return column.isComplex() ? filter.fetchedCellIsQueried(column, cell.path()) : filter.fetchedColumnIsQueried(column); } };
public Row withOnlyQueriedData(ColumnFilter filter) { if (filter.allFetchedColumnsAreQueried()) return this; return transformAndFilter(primaryKeyLivenessInfo, deletion, (cd) -> { ColumnDefinition column = cd.column(); if (column.isComplex()) return ((ComplexColumnData)cd).withOnlyQueriedData(filter); return filter.fetchedColumnIsQueried(column) ? cd : null; }); }
private boolean isQueried(Cell cell) { // When we read, we may have some cell that have been fetched but are not selected by the user. Those cells may // have empty values as optimization (see CASSANDRA-10655) and hence they should not be included in the read-repair. // This is fine since those columns are not actually requested by the user and are only present for the sake of CQL // semantic (making sure we can always distinguish between a row that doesn't exist from one that do exist but has /// no value for the column requested by the user) and so it won't be unexpected by the user that those columns are // not repaired. ColumnDefinition column = cell.column(); ColumnFilter filter = command.columnFilter(); return column.isComplex() ? filter.fetchedCellIsQueried(column, cell.path()) : filter.fetchedColumnIsQueried(column); } };
private boolean isQueried(Cell cell) { // When we read, we may have some cell that have been fetched but are not selected by the user. Those cells may // have empty values as optimization (see CASSANDRA-10655) and hence they should not be included in the read-repair. // This is fine since those columns are not actually requested by the user and are only present for the sake of CQL // semantic (making sure we can always distinguish between a row that doesn't exist from one that do exist but has /// no value for the column requested by the user) and so it won't be unexpected by the user that those columns are // not repaired. ColumnDefinition column = cell.column(); ColumnFilter filter = command.columnFilter(); return column.isComplex() ? filter.fetchedCellIsQueried(column, cell.path()) : filter.fetchedColumnIsQueried(column); } };
public boolean includes(Cell cell, LivenessInfo rowLiveness) { if (columnsToFetch == null) return true; // During queries, some columns are included even though they are not queried by the user because // we always need to distinguish between having a row (with potentially only null values) and not // having a row at all (see #CASSANDRA-7085 for background). In the case where the column is not // actually requested by the user however (canSkipValue), we can skip the full cell if the cell // timestamp is lower than the row one, because in that case, the row timestamp is enough proof // of the liveness of the row. Otherwise, we'll only be able to skip the values of those cells. ColumnDefinition column = cell.column(); if (column.isComplex()) { if (!includes(cell.path())) return false; return !canSkipValue(cell.path()) || cell.timestamp() >= rowLiveness.timestamp(); } else { return columnsToFetch.fetchedColumnIsQueried(column) || cell.timestamp() >= rowLiveness.timestamp(); } }
public boolean includes(Cell cell, LivenessInfo rowLiveness) { if (columnsToFetch == null) return true; // During queries, some columns are included even though they are not queried by the user because // we always need to distinguish between having a row (with potentially only null values) and not // having a row at all (see #CASSANDRA-7085 for background). In the case where the column is not // actually requested by the user however (canSkipValue), we can skip the full cell if the cell // timestamp is lower than the row one, because in that case, the row timestamp is enough proof // of the liveness of the row. Otherwise, we'll only be able to skip the values of those cells. ColumnDefinition column = cell.column(); if (column.isComplex()) { if (!includes(cell.path())) return false; return !canSkipValue(cell.path()) || cell.timestamp() >= rowLiveness.timestamp(); } else { return columnsToFetch.fetchedColumnIsQueried(column) || cell.timestamp() >= rowLiveness.timestamp(); } }
public boolean includes(Cell cell, LivenessInfo rowLiveness) { if (columnsToFetch == null) return true; // During queries, some columns are included even though they are not queried by the user because // we always need to distinguish between having a row (with potentially only null values) and not // having a row at all (see #CASSANDRA-7085 for background). In the case where the column is not // actually requested by the user however (canSkipValue), we can skip the full cell if the cell // timestamp is lower than the row one, because in that case, the row timestamp is enough proof // of the liveness of the row. Otherwise, we'll only be able to skip the values of those cells. ColumnDefinition column = cell.column(); if (column.isComplex()) { if (!includes(cell.path())) return false; return !canSkipValue(cell.path()) || cell.timestamp() >= rowLiveness.timestamp(); } else { return columnsToFetch.fetchedColumnIsQueried(column) || cell.timestamp() >= rowLiveness.timestamp(); } }
public boolean includes(Cell cell, LivenessInfo rowLiveness) { if (columnsToFetch == null) return true; // During queries, some columns are included even though they are not queried by the user because // we always need to distinguish between having a row (with potentially only null values) and not // having a row at all (see #CASSANDRA-7085 for background). In the case where the column is not // actually requested by the user however (canSkipValue), we can skip the full cell if the cell // timestamp is lower than the row one, because in that case, the row timestamp is enough proof // of the liveness of the row. Otherwise, we'll only be able to skip the values of those cells. ColumnDefinition column = cell.column(); if (column.isComplex()) { if (!includes(cell.path())) return false; return !canSkipValue(cell.path()) || cell.timestamp() >= rowLiveness.timestamp(); } else { return columnsToFetch.fetchedColumnIsQueried(column) || cell.timestamp() >= rowLiveness.timestamp(); } }