feat:字段访问支持访问数组

This commit is contained in:
rulego-team
2025-06-16 12:45:12 +08:00
parent a05f4ace98
commit 43a9f46f24
14 changed files with 2689 additions and 766 deletions

View File

@ -11,13 +11,13 @@ import (
"time"
"github.com/rulego/streamsql/condition"
"github.com/rulego/streamsql/utils/fieldpath"
"github.com/rulego/streamsql/aggregator"
"github.com/rulego/streamsql/expr"
"github.com/rulego/streamsql/functions"
"github.com/rulego/streamsql/logger"
"github.com/rulego/streamsql/types"
"github.com/rulego/streamsql/utils"
"github.com/rulego/streamsql/window"
)
@ -446,8 +446,8 @@ func (s *Stream) processDirectData(data interface{}) {
var value interface{}
var exists bool
if utils.IsNestedField(fieldName) {
value, exists = utils.GetNestedField(data, fieldName)
if fieldpath.IsNestedField(fieldName) {
value, exists = fieldpath.GetNestedField(data, fieldName)
} else {
value, exists = dataMap[fieldName]
}