cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sn...@apache.org
Subject [1/2] cassandra git commit: SchemaKeyspace.addAggregateToSchemaMutation keeps previous on CREATE OR REPLACE AGGREGATE
Date Mon, 24 Aug 2015 15:12:06 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 640ecf354 -> 903a54d8a


SchemaKeyspace.addAggregateToSchemaMutation keeps previous on CREATE OR REPLACE AGGREGATE

patch by Robert Stupp; reviewed by Aleksey Yeschenko for CASSANDRA-10157


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7ad1da56
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7ad1da56
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7ad1da56

Branch: refs/heads/trunk
Commit: 7ad1da5678b3eca3383e3f70862d0a7728ec6be9
Parents: 707b2da
Author: Robert Stupp <snazy@snazy.de>
Authored: Mon Aug 24 17:10:31 2015 +0200
Committer: Robert Stupp <snazy@snazy.de>
Committed: Mon Aug 24 17:10:31 2015 +0200

----------------------------------------------------------------------
 .../apache/cassandra/schema/SchemaKeyspace.java   | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7ad1da56/src/java/org/apache/cassandra/schema/SchemaKeyspace.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/schema/SchemaKeyspace.java b/src/java/org/apache/cassandra/schema/SchemaKeyspace.java
index acd9e93..2df4ca4 100644
--- a/src/java/org/apache/cassandra/schema/SchemaKeyspace.java
+++ b/src/java/org/apache/cassandra/schema/SchemaKeyspace.java
@@ -1553,18 +1553,12 @@ public final class SchemaKeyspace
                                  .clustering(aggregate.name().name, functionSignatureWithTypes(aggregate));
 
         adder.add("return_type", aggregate.returnType().toString())
-             .add("state_func", aggregate.stateFunction().name().name);
-
-        if (aggregate.stateType() != null)
-            adder.add("state_type", aggregate.stateType().toString());
-        if (aggregate.finalFunction() != null)
-            adder.add("final_func", aggregate.finalFunction().name().name);
-        if (aggregate.initialCondition() != null)
-            adder.add("initcond", aggregate.initialCondition());
-
-        adder.frozenList("argument_types", aggregate.argTypes().stream().map(AbstractType::toString).collect(Collectors.toList()));
-
-        adder.build();
+             .add("state_func", aggregate.stateFunction().name().name)
+             .add("state_type", aggregate.stateType() != null ? aggregate.stateType().toString()
: null)
+             .add("final_func", aggregate.finalFunction() != null ? aggregate.finalFunction().name().name
: null)
+             .add("initcond", aggregate.initialCondition())
+             .frozenList("argument_types", aggregate.argTypes().stream().map(AbstractType::toString).collect(Collectors.toList()))
+             .build();
     }
 
     private static Collection<UDAggregate> createAggregatesFromAggregatesPartition(RowIterator
partition)


Mime
View raw message