mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-07 03:17:50 +00:00
Merge pull request #1955 from molecula/fb1225
[FB-1225] don't look up a field by name to find out its name
This commit is contained in:
commit
789fef7a8e
2 changed files with 5 additions and 2 deletions
|
|
@ -1007,6 +1007,10 @@ func TestQuerySQLWithError(t *testing.T) {
|
|||
sql: "select _id, age, field_not_found from grouper",
|
||||
err: pilosa.ErrFieldNotFound,
|
||||
},
|
||||
{
|
||||
sql: "select age, color, count(*) from grouper group by field_not_found, age, color",
|
||||
err: pilosa.ErrFieldNotFound,
|
||||
},
|
||||
}
|
||||
|
||||
for i, test := range tests {
|
||||
|
|
|
|||
|
|
@ -598,8 +598,7 @@ func (h handlerSelectGroupBy) Apply(stmt *sqlparser.Select, qm QueryMask, indexF
|
|||
|
||||
rowsQueries := []string{}
|
||||
for _, fieldName := range groupByFieldNames {
|
||||
field := index.Field(fieldName)
|
||||
rowsQueries = append(rowsQueries, Rows(field.Name()))
|
||||
rowsQueries = append(rowsQueries, Rows(fieldName))
|
||||
}
|
||||
|
||||
var wherePQL string
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue