@Override public String toString() { return name.toString(); }
public UTName(ColumnIdentifier ksName, ColumnIdentifier utName) { this.ksName = ksName == null ? null : ksName.toString(); this.utName = utName; }
@Override protected String getColumnName() { return def.name.toString(); }
public UTName(ColumnIdentifier ksName, ColumnIdentifier utName) { this.ksName = ksName == null ? null : ksName.toString(); this.utName = utName; }
@Override public String toString() { return name.toString(); }
@Override protected String getColumnName() { return def.name.toString(); }
public IndexTarget(ColumnIdentifier column, Type type) { this.column = column; this.type = type; // if the column name contains anything other than lower case alphanumerics // or underscores, then it must be quoted when included in the target string quoteName = !COLUMN_IDENTIFIER_PATTERN.matcher(column.toString()).matches(); }
UDFContextImpl(List<ColumnIdentifier> argNames, TypeCodec<Object>[] argCodecs, TypeCodec<Object> returnCodec, KeyspaceMetadata keyspaceMetadata) { for (int i = 0; i < argNames.size(); i++) byName.put(argNames.get(i).toString(), argCodecs[i]); this.argCodecs = argCodecs; this.returnCodec = returnCodec; this.keyspaceMetadata = keyspaceMetadata; }
UDFContextImpl(List<ColumnIdentifier> argNames, TypeCodec<Object>[] argCodecs, TypeCodec<Object> returnCodec, KeyspaceMetadata keyspaceMetadata) { for (int i = 0; i < argNames.size(); i++) byName.put(argNames.get(i).toString(), argCodecs[i]); this.argCodecs = argCodecs; this.returnCodec = returnCodec; this.keyspaceMetadata = keyspaceMetadata; }
public Row(List<ColumnSpecification> names, List<ByteBuffer> columns) { this.columns.addAll(names); for (int i = 0; i < names.size(); i++) data.put(names.get(i).name.toString(), columns.get(i)); }
/** * Adds the column definition as a dropped column, recording the drop with the provided timestamp. */ public void recordColumnDrop(ColumnDefinition def, long timeMicros) { droppedColumns.put(def.name.bytes, new DroppedColumn(def.name.toString(), def.type, timeMicros)); }
@Override public Selector newInstance(QueryOptions options) { return new SimpleSelector(def.name.toString(), idx, def.type); }
private void validateIndexedValue(ByteBuffer value) { if (value != null && value.remaining() >= FBUtilities.MAX_UNSIGNED_SHORT) throw new InvalidRequestException(String.format( "Cannot index value of size %d for index %s on %s.%s(%s) (maximum allowed size=%d)", value.remaining(), metadata.name, baseCfs.metadata.ksName, baseCfs.metadata.cfName, indexedColumn.name.toString(), FBUtilities.MAX_UNSIGNED_SHORT)); }
public static DefaultNames defaultNameGenerator(Iterable<ColumnDefinition> defs) { Set<String> usedNames = new HashSet<>(); for (ColumnDefinition def : defs) usedNames.add(def.name.toString()); return new DefaultNames(usedNames); }
@Override public Selector newInstance(QueryOptions options) { return new SimpleSelector(def.name.toString(), idx, def.type); }
/** * Dense flag might have been incorrectly set if the node was upgraded from 2.x before CASSANDRA-12373. * * For 3.x created tables, the flag is set correctly in ThriftConversion code. */ public static boolean recalculateIsDense(Columns columns) { return columns.size() == 1 && columns.getComplex(0).name.toString().isEmpty(); }
private static String toCQL(ColumnDefinition cd, boolean isStaticCompactTable) { return String.format("%s %s%s", quoteIdentifier(cd.name.toString()), cd.type.asCQL3Type().toString(), cd.isStatic() && !isStaticCompactTable ? " static" : ""); }
private static void dropColumnFromSchemaMutation(CFMetaData table, ColumnDefinition column, Mutation.SimpleBuilder builder) { // Note: we do want to use name.toString(), not name.bytes directly for backward compatibility (For CQL3, this won't make a difference). builder.update(Columns).row(table.cfName, column.name.toString()).delete(); }
private static String toCQLAdd(String keyspace, String cf, ColumnDefinition cd) { return String.format("ALTER TABLE %s.%s ADD %s %s%s;", quoteIdentifier(keyspace), quoteIdentifier(cf), quoteIdentifier(cd.name.toString()), cd.type.asCQL3Type().toString(), cd.isStatic() ? " static" : ""); }
private static String toCQLAdd(String keyspace, String cf, ColumnDefinition cd) { return String.format("ALTER TABLE %s.%s ADD %s %s%s;", quoteIdentifier(keyspace), quoteIdentifier(cf), quoteIdentifier(cd.name.toString()), cd.type.asCQL3Type().toString(), cd.isStatic() ? " static" : ""); }