This commit is contained in:
Aliaksandr Valialkin 2024-05-07 13:45:23 +02:00
parent 866c070f32
commit f0d8284c8a
No known key found for this signature in database
GPG key ID: 52C003EE2BCDB9EB
2 changed files with 12 additions and 2 deletions

View file

@ -229,7 +229,7 @@ func (q *Query) getNeededColumns() []string {
}
dropFieldsNext := make(map[string]struct{})
for k := range m {
if referredFields[k] == 0 {
if k != "*" && referredFields[k] == 0 {
dropFieldsNext[k] = struct{}{}
}
}
@ -266,6 +266,9 @@ func (q *Query) getNeededColumns() []string {
dst = append(dst, f)
}
}
if a, ok := m["*"]; ok {
dst = append(dst, a...)
}
input = normalizeFields(dst)
if len(input) == 0 {
break

View file

@ -38,7 +38,14 @@ func (ps *pipeSort) String() string {
}
func (ps *pipeSort) getNeededFields() ([]string, map[string][]string) {
return []string{"*"}, nil
fields := make([]string, len(ps.byFields))
for i, bf := range ps.byFields {
fields[i] = bf.name
}
m := map[string][]string{
"*": fields,
}
return []string{"*"}, m
}
func (ps *pipeSort) newPipeProcessor(workersCount int, stopCh <-chan struct{}, cancel func(), ppBase pipeProcessor) pipeProcessor {