From 7d24276a98dd73bc17eb9e828f2138446a304340 Mon Sep 17 00:00:00 2001 From: Matt Jaffee Date: Thu, 27 Sep 2018 16:18:37 -0500 Subject: [PATCH] rename "columns" to "rows" in Rows test so it makes sense --- executor_test.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/executor_test.go b/executor_test.go index 0de3016f1..a00a9ab93 100644 --- a/executor_test.go +++ b/executor_test.go @@ -1652,28 +1652,29 @@ func TestExecutor_Execute_Rows(t *testing.T) { if res, err := c[0].API.Query(context.Background(), &pilosa.QueryRequest{Index: "i", Query: `Rows(field=general)`}); err != nil { t.Fatal(err) - } else if columns := res.Results[0].(pilosa.RowIdentifiers); !reflect.DeepEqual(columns, pilosa.RowIdentifiers{Rows: []uint64{10, 11, 12}}) { - t.Fatalf("unexpected columns: %+v", columns) + } else if rows := res.Results[0].(pilosa.RowIdentifiers); !reflect.DeepEqual(rows, pilosa.RowIdentifiers{Rows: []uint64{10, 11, 12}}) { + t.Fatalf("unexpected rows: %+v", rows) } if res, err := c[0].API.Query(context.Background(), &pilosa.QueryRequest{Index: "i", Query: `Rows(field=general, limit=2)`}); err != nil { t.Fatal(err) - } else if columns := res.Results[0].(pilosa.RowIdentifiers); !reflect.DeepEqual(columns, pilosa.RowIdentifiers{Rows: []uint64{10, 11}}) { - t.Fatalf("unexpected columns: %+v", columns) + } else if rows := res.Results[0].(pilosa.RowIdentifiers); !reflect.DeepEqual(rows, pilosa.RowIdentifiers{Rows: []uint64{10, 11}}) { + t.Fatalf("unexpected rows: %+v", rows) } if res, err := c[0].API.Query(context.Background(), &pilosa.QueryRequest{Index: "i", Query: `Rows(field=general, previous=10,limit=2)`}); err != nil { t.Fatal(err) - } else if columns := res.Results[0].(pilosa.RowIdentifiers); !reflect.DeepEqual(columns, pilosa.RowIdentifiers{Rows: []uint64{11, 12}}) { - t.Fatalf("unexpected columns: %+v", columns) + } else if rows := res.Results[0].(pilosa.RowIdentifiers); !reflect.DeepEqual(rows, pilosa.RowIdentifiers{Rows: []uint64{11, 12}}) { + t.Fatalf("unexpected rows: %+v", rows) } if res, err := c[0].API.Query(context.Background(), &pilosa.QueryRequest{Index: "i", Query: `Rows(field=general, column=2)`}); err != nil { t.Fatal(err) - } else if columns := res.Results[0].(pilosa.RowIdentifiers); !reflect.DeepEqual(columns, pilosa.RowIdentifiers{Rows: []uint64{11, 12}}) { - t.Fatalf("unexpected columns: %+v", columns) + } else if rows := res.Results[0].(pilosa.RowIdentifiers); !reflect.DeepEqual(rows, pilosa.RowIdentifiers{Rows: []uint64{11, 12}}) { + t.Fatalf("unexpected rows: %+v", rows) } } + func TestExecutor_Execute_GroupBy(t *testing.T) { c := test.MustRunCluster(t, 1) defer c.Close()