We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9947a67 commit 899c31eCopy full SHA for 899c31e
1 file changed
cassandra/metadata.py
@@ -718,10 +718,8 @@ def as_cql_query(self, formatted=False):
718
if len(self.partition_key) > 1 or self.clustering_key:
719
ret += "%s%sPRIMARY KEY (" % (column_join, padding)
720
721
- if len(self.partition_key) > 1:
722
- ret += "(%s)" % ", ".join(protect_name(col.name) for col in self.partition_key)
723
- else:
724
- ret += self.partition_key[0].name
+ # Changed as part of CASSANDRA-7274
+ ret += "(%s)" % ", ".join(protect_name(col.name) for col in self.partition_key)
725
726
if self.clustering_key:
727
ret += ", %s" % ", ".join(protect_name(col.name) for col in self.clustering_key)
0 commit comments