mirror of https://github.com/apache/cassandra
fix CLI `show schema` command insert of an extra comma in column_metadata
patch by Yuki Morishita; reviewed by Pavel Yaskevich for CASSANDRA-3714
This commit is contained in:
parent
f64c17e428
commit
044eb1edea
|
|
@ -28,6 +28,8 @@ Merged from 0.8:
|
|||
is disabled (CASSANDRA-3696)
|
||||
* fix for SelectStatement start/end key are not set correctly
|
||||
when a key alias is involved (CASSANDRA-3700)
|
||||
* fix CLI `show schema` command insert of an extra comma in
|
||||
column_metadata (CASSANDRA-3714)
|
||||
|
||||
|
||||
1.0.6
|
||||
|
|
|
|||
|
|
@ -1756,14 +1756,18 @@ public class CliClient
|
|||
{
|
||||
sb.append("," + NEWLINE);
|
||||
sb.append(TAB + TAB + "index_name : '" + CliUtils.escapeSQLString(colDef.index_name) + "'," + NEWLINE);
|
||||
sb.append(TAB + TAB + "index_type : " + CliUtils.escapeSQLString(Integer.toString(colDef.index_type.getValue())) + "," + NEWLINE);
|
||||
sb.append(TAB + TAB + "index_type : " + CliUtils.escapeSQLString(Integer.toString(colDef.index_type.getValue())));
|
||||
|
||||
if (colDef.index_options != null)
|
||||
{
|
||||
sb.append(TAB + TAB + "index_options : {"+NEWLINE);
|
||||
sb.append("," + NEWLINE);
|
||||
sb.append(TAB + TAB + "index_options : {" + NEWLINE);
|
||||
int numOpts = colDef.index_options.size();
|
||||
for (Map.Entry<String, String> entry : colDef.index_options.entrySet())
|
||||
{
|
||||
sb.append(TAB + TAB + TAB + CliUtils.escapeSQLString(entry.getKey()) + ": '" + CliUtils.escapeSQLString(entry.getValue()) + "'," + NEWLINE);
|
||||
sb.append(TAB + TAB + TAB + CliUtils.escapeSQLString(entry.getKey()) + ": '" + CliUtils.escapeSQLString(entry.getValue()) + "'");
|
||||
if (--numOpts > 0)
|
||||
sb.append("," + NEWLINE);
|
||||
}
|
||||
sb.append("}");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue