mirror of https://github.com/apache/cassandra
update
This commit is contained in:
parent
fba321c4ec
commit
fcf9a239e1
|
|
@ -64,7 +64,7 @@ public class ReferenceOperation
|
|||
}
|
||||
|
||||
/**
|
||||
* Creates a {@link ReferenceOperation} from the given {@link Operation} for the purpose of defering execution
|
||||
* Creates a {@link ReferenceOperation} from the given {@link Operation} for the purpose of defering execution
|
||||
* within a transaction. When the language sees an Operation using a reference one is created already, but for cases
|
||||
* that needs to defer execution (such as when {@link Operation#requiresRead()} is true), this method can be used.
|
||||
*/
|
||||
|
|
@ -77,7 +77,6 @@ public class ReferenceOperation
|
|||
ReferenceValue value = new ReferenceValue.Constant(operation.term());
|
||||
Term key = extractKeyOrIndex(operation);
|
||||
FieldIdentifier field = extractField(operation);
|
||||
// Chore: Maybe we should change the semantics of this?
|
||||
return new ReferenceOperation(receiver, table, kind, key, field, null, value);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -55,9 +55,9 @@ import org.apache.cassandra.schema.TableMetadata;
|
|||
import org.apache.cassandra.service.accord.serializers.TableMetadatas;
|
||||
import org.apache.cassandra.utils.AbstractTypeGenerators;
|
||||
import org.apache.cassandra.utils.ByteBufferUtil;
|
||||
import org.apache.cassandra.utils.Generators;
|
||||
|
||||
import static accord.utils.Property.qt;
|
||||
import static org.apache.cassandra.utils.Generators.toGen;
|
||||
|
||||
public class TxnReferenceOperationTest
|
||||
{
|
||||
|
|
@ -110,7 +110,7 @@ public class TxnReferenceOperationTest
|
|||
|
||||
private static Gen<TxnReferenceValue> valueGen(AbstractType<?> type)
|
||||
{
|
||||
return toGen(AbstractTypeGenerators.getTypeSupport(type)
|
||||
return Generators.toGen(AbstractTypeGenerators.getTypeSupport(type)
|
||||
.bytesGen())
|
||||
.map(TxnReferenceValue.Constant::new);
|
||||
}
|
||||
|
|
@ -140,7 +140,7 @@ public class TxnReferenceOperationTest
|
|||
break;
|
||||
case Discarder:
|
||||
{
|
||||
CollectionType<?> type = (CollectionType<?>) toGen(AbstractTypeGenerators.builder()
|
||||
CollectionType<?> type = (CollectionType<?>) Generators.toGen(AbstractTypeGenerators.builder()
|
||||
.withMaxDepth(1)
|
||||
.withTypeKinds(AbstractTypeGenerators.TypeKind.LIST,
|
||||
AbstractTypeGenerators.TypeKind.SET,
|
||||
|
|
@ -197,14 +197,14 @@ public class TxnReferenceOperationTest
|
|||
receiver = table.getColumn(ColumnIdentifier.getInterned("col", true));
|
||||
value = valueGen(type).next(rs);
|
||||
if (rs.nextBoolean())
|
||||
constant = toGen(AbstractTypeGenerators.getTypeSupport(type).bytesGen()).next(rs);
|
||||
constant = Generators.toGen(AbstractTypeGenerators.getTypeSupport(type).bytesGen()).next(rs);
|
||||
kind = group == Group.Adder ? TxnReferenceOperation.Kind.ConstantAdder : TxnReferenceOperation.Kind.ConstantSubtracter;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case Setter:
|
||||
{
|
||||
var type = toGen(AbstractTypeGenerators.builder()
|
||||
var type = Generators.toGen(AbstractTypeGenerators.builder()
|
||||
.withoutUnsafeEquality()
|
||||
.withMaxDepth(1)
|
||||
.build())
|
||||
|
|
|
|||
Loading…
Reference in New Issue