private Builder addSubSelection(ColumnSubselection subSelection) { add(subSelection.column()); if (subSelections == null) subSelections = new ArrayList<>(); subSelections.add(subSelection); return this; }
private Builder addSubSelection(ColumnSubselection subSelection) { add(subSelection.column()); if (subSelections == null) subSelections = new ArrayList<>(); subSelections.add(subSelection); return this; }
private Builder addSubSelection(ColumnSubselection subSelection) { add(subSelection.column()); if (subSelections == null) subSelections = new ArrayList<>(); subSelections.add(subSelection); return this; }
private Builder addSubSelection(ColumnSubselection subSelection) { add(subSelection.column()); if (subSelections == null) subSelections = new ArrayList<>(); subSelections.add(subSelection); return this; }
public ColumnFilter build() { boolean isFetchAll = metadata != null; PartitionColumns queried = queriedBuilder == null ? null : queriedBuilder.build(); // It's only ok to have queried == null in ColumnFilter if isFetchAll. So deal with the case of a selectionBuilder // with nothing selected (we can at least happen on some backward compatible queries - CASSANDRA-10471). if (!isFetchAll && queried == null) queried = PartitionColumns.NONE; SortedSetMultimap<ColumnIdentifier, ColumnSubselection> s = null; if (subSelections != null) { s = TreeMultimap.create(Comparator.<ColumnIdentifier>naturalOrder(), Comparator.<ColumnSubselection>naturalOrder()); for (ColumnSubselection subSelection : subSelections) s.put(subSelection.column().name, subSelection); } return new ColumnFilter(isFetchAll, metadata, queried, s); } }
public ColumnFilter build() { boolean isFetchAll = metadata != null; PartitionColumns queried = queriedBuilder == null ? null : queriedBuilder.build(); // It's only ok to have queried == null in ColumnFilter if isFetchAll. So deal with the case of a selectionBuilder // with nothing selected (we can at least happen on some backward compatible queries - CASSANDRA-10471). if (!isFetchAll && queried == null) queried = PartitionColumns.NONE; SortedSetMultimap<ColumnIdentifier, ColumnSubselection> s = null; if (subSelections != null) { s = TreeMultimap.create(Comparator.<ColumnIdentifier>naturalOrder(), Comparator.<ColumnSubselection>naturalOrder()); for (ColumnSubselection subSelection : subSelections) s.put(subSelection.column().name, subSelection); } return new ColumnFilter(isFetchAll, isFetchAll ? metadata.partitionColumns() : null, queried, s); } }
public ColumnFilter build() { boolean isFetchAll = metadata != null; PartitionColumns queried = queriedBuilder == null ? null : queriedBuilder.build(); // It's only ok to have queried == null in ColumnFilter if isFetchAll. So deal with the case of a selectionBuilder // with nothing selected (we can at least happen on some backward compatible queries - CASSANDRA-10471). if (!isFetchAll && queried == null) queried = PartitionColumns.NONE; SortedSetMultimap<ColumnIdentifier, ColumnSubselection> s = null; if (subSelections != null) { s = TreeMultimap.create(Comparator.<ColumnIdentifier>naturalOrder(), Comparator.<ColumnSubselection>naturalOrder()); for (ColumnSubselection subSelection : subSelections) s.put(subSelection.column().name, subSelection); } return new ColumnFilter(isFetchAll, isFetchAll ? metadata.partitionColumns() : null, queried, s); } }
public ColumnFilter build() { boolean isFetchAll = metadata != null; PartitionColumns queried = queriedBuilder == null ? null : queriedBuilder.build(); // It's only ok to have queried == null in ColumnFilter if isFetchAll. So deal with the case of a selectionBuilder // with nothing selected (we can at least happen on some backward compatible queries - CASSANDRA-10471). if (!isFetchAll && queried == null) queried = PartitionColumns.NONE; SortedSetMultimap<ColumnIdentifier, ColumnSubselection> s = null; if (subSelections != null) { s = TreeMultimap.create(Comparator.<ColumnIdentifier>naturalOrder(), Comparator.<ColumnSubselection>naturalOrder()); for (ColumnSubselection subSelection : subSelections) s.put(subSelection.column().name, subSelection); } return new ColumnFilter(isFetchAll, isFetchAll ? metadata.partitionColumns() : null, queried, s); } }
public void serialize(ColumnSubselection subSel, DataOutputPlus out, int version) throws IOException { ColumnDefinition column = subSel.column(); ByteBufferUtil.writeWithShortLength(column.name.bytes, out); out.writeByte(subSel.kind().ordinal()); switch (subSel.kind()) { case SLICE: Slice slice = (Slice)subSel; column.cellPathSerializer().serialize(slice.from, out); column.cellPathSerializer().serialize(slice.to, out); break; case ELEMENT: Element eltSelection = (Element)subSel; column.cellPathSerializer().serialize(eltSelection.element, out); break; default: throw new AssertionError(); } }
public void serialize(ColumnSubselection subSel, DataOutputPlus out, int version) throws IOException { ColumnDefinition column = subSel.column(); ByteBufferUtil.writeWithShortLength(column.name.bytes, out); out.writeByte(subSel.kind().ordinal()); switch (subSel.kind()) { case SLICE: Slice slice = (Slice)subSel; column.cellPathSerializer().serialize(slice.from, out); column.cellPathSerializer().serialize(slice.to, out); break; case ELEMENT: Element eltSelection = (Element)subSel; column.cellPathSerializer().serialize(eltSelection.element, out); break; default: throw new AssertionError(); } }
public void serialize(ColumnSubselection subSel, DataOutputPlus out, int version) throws IOException { ColumnDefinition column = subSel.column(); ByteBufferUtil.writeWithShortLength(column.name.bytes, out); out.writeByte(subSel.kind().ordinal()); switch (subSel.kind()) { case SLICE: Slice slice = (Slice)subSel; column.cellPathSerializer().serialize(slice.from, out); column.cellPathSerializer().serialize(slice.to, out); break; case ELEMENT: Element eltSelection = (Element)subSel; column.cellPathSerializer().serialize(eltSelection.element, out); break; default: throw new AssertionError(); } }
public void serialize(ColumnSubselection subSel, DataOutputPlus out, int version) throws IOException { ColumnDefinition column = subSel.column(); ByteBufferUtil.writeWithShortLength(column.name.bytes, out); out.writeByte(subSel.kind().ordinal()); switch (subSel.kind()) { case SLICE: Slice slice = (Slice)subSel; column.cellPathSerializer().serialize(slice.from, out); column.cellPathSerializer().serialize(slice.to, out); break; case ELEMENT: Element eltSelection = (Element)subSel; column.cellPathSerializer().serialize(eltSelection.element, out); break; default: throw new AssertionError(); } }
public long serializedSize(ColumnSubselection subSel, int version) { long size = 0; ColumnDefinition column = subSel.column(); size += TypeSizes.sizeofWithShortLength(column.name.bytes); size += 1; // kind switch (subSel.kind()) { case SLICE: Slice slice = (Slice)subSel; size += column.cellPathSerializer().serializedSize(slice.from); size += column.cellPathSerializer().serializedSize(slice.to); break; case ELEMENT: Element element = (Element)subSel; size += column.cellPathSerializer().serializedSize(element.element); break; } return size; } }
public long serializedSize(ColumnSubselection subSel, int version) { long size = 0; ColumnDefinition column = subSel.column(); size += TypeSizes.sizeofWithShortLength(column.name.bytes); size += 1; // kind switch (subSel.kind()) { case SLICE: Slice slice = (Slice)subSel; size += column.cellPathSerializer().serializedSize(slice.from); size += column.cellPathSerializer().serializedSize(slice.to); break; case ELEMENT: Element element = (Element)subSel; size += column.cellPathSerializer().serializedSize(element.element); break; } return size; } }
public long serializedSize(ColumnSubselection subSel, int version) { long size = 0; ColumnDefinition column = subSel.column(); size += TypeSizes.sizeofWithShortLength(column.name.bytes); size += 1; // kind switch (subSel.kind()) { case SLICE: Slice slice = (Slice)subSel; size += column.cellPathSerializer().serializedSize(slice.from); size += column.cellPathSerializer().serializedSize(slice.to); break; case ELEMENT: Element element = (Element)subSel; size += column.cellPathSerializer().serializedSize(element.element); break; } return size; } }
public long serializedSize(ColumnSubselection subSel, int version) { long size = 0; ColumnDefinition column = subSel.column(); size += TypeSizes.sizeofWithShortLength(column.name.bytes); size += 1; // kind switch (subSel.kind()) { case SLICE: Slice slice = (Slice)subSel; size += column.cellPathSerializer().serializedSize(slice.from); size += column.cellPathSerializer().serializedSize(slice.to); break; case ELEMENT: Element element = (Element)subSel; size += column.cellPathSerializer().serializedSize(element.element); break; } return size; } }