Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: lookup table problems #2961

Merged
merged 3 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ require (
github.com/keepeye/logrus-filename v0.0.0-20190711075016-ce01a4391dd1
github.com/klauspost/compress v1.17.7
github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible
github.com/lf-edge/ekuiper/contract/v2 v2.0.0-alpha.2
github.com/lf-edge/ekuiper/contract/v2 v2.0.0-alpha.3
github.com/mitchellh/mapstructure v1.5.0
github.com/mochi-mqtt/server/v2 v2.6.4
github.com/modern-go/reflect2 v1.0.2
Expand Down
15 changes: 9 additions & 6 deletions internal/topo/node/lookup_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,15 @@ func NewLookupNode(ctx api.StreamContext, name string, isBytesLookup bool, field
if (sc.PayloadFormat == "" && sc.PayloadField != "") || (sc.PayloadFormat != "" && sc.PayloadField == "") {
return nil, fmt.Errorf("payloadFormat and payloadField must set together")
}
sch := make(map[string]*ast.JsonStreamField, len(fields))
for _, field := range fields {
sch[field] = nil
}
if sc.PayloadField != "" {
sch[sc.PayloadField] = nil
var sch map[string]*ast.JsonStreamField
if len(fields) > 0 {
sch = make(map[string]*ast.JsonStreamField, len(fields))
for _, field := range fields {
sch[field] = nil
}
if sc.PayloadField != "" {
sch[sc.PayloadField] = nil
}
}

decoder, err := converter.GetOrCreateConverter(ctx, srcOptions.FORMAT, srcOptions.SCHEMAID, sch, props)
Expand Down
2 changes: 1 addition & 1 deletion pkg/nng/sock.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
if s.Socket != nil && s.connected.Load() {
return s.Socket.Send(data)
}
return errorx.NewIOErr(`neuron connection is not established`)
return errorx.NewIOErr(`nng connection is not established`)

Check warning on line 149 in pkg/nng/sock.go

View check run for this annotation

Codecov / codecov/patch

pkg/nng/sock.go#L149

Added line #L149 was not covered by tests
}

var _ modules.Connection = &Sock{}
Loading