Skip to content

Commit c33a85f

Browse files
committed
Merge pull request apache#9 from josh-mckenzie/8099/fix_broken_validate
fix indexCFMD creation w/out idxType specified
2 parents 4c4b1b0 + 76aeec6 commit c33a85f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/unit/org/apache/cassandra/SchemaLoader.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,8 @@ public static CFMetaData indexCFMD(String ksName, String cfName, boolean withIdx
457457
.build();
458458

459459
ByteBuffer cName = ByteBufferUtil.bytes("birthdate");
460-
cfm.getColumnDefinition(cName).setIndex(withIdxType ? ByteBufferUtil.bytesToHex(cName) : null, IndexType.COMPOSITES, Collections.EMPTY_MAP);
460+
IndexType keys = withIdxType ? IndexType.COMPOSITES : null;
461+
cfm.getColumnDefinition(cName).setIndex(withIdxType ? ByteBufferUtil.bytesToHex(cName) : null, keys, Collections.EMPTY_MAP);
461462

462463
return cfm;
463464
}

0 commit comments

Comments
 (0)