has a bug

This commit is contained in:
chrislu
2024-04-22 00:42:18 -07:00
parent cc1ce3de87
commit 9ef238b610
6 changed files with 317 additions and 19 deletions

View File

@@ -2,6 +2,7 @@ package schema
import (
"github.com/seaweedfs/seaweedfs/weed/pb/schema_pb"
"sort"
)
var (
@@ -23,6 +24,10 @@ func NewRecordTypeBuilder() *RecordTypeBuilder {
}
func (rtb *RecordTypeBuilder) Build() *schema_pb.RecordType {
// be consistent with parquet.node.go `func (g Group) Fields() []Field`
sort.Slice(rtb.recordType.Fields, func(i, j int) bool {
return rtb.recordType.Fields[i].Name < rtb.recordType.Fields[j].Name
})
return rtb.recordType
}