From 9230fc8fd265ac68ae7bbe48ac55d3cb5d82577f Mon Sep 17 00:00:00 2001 From: Jiyong Huang Date: Wed, 25 Dec 2024 17:22:38 +0800 Subject: [PATCH] chore(fix): batch csv missing nl Signed-off-by: Jiyong Huang --- internal/topo/node/batch_op.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/topo/node/batch_op.go b/internal/topo/node/batch_op.go index 0f58f4989..d06426565 100644 --- a/internal/topo/node/batch_op.go +++ b/internal/topo/node/batch_op.go @@ -130,7 +130,7 @@ func (b *BatchOp) ingest(ctx api.StreamContext, item any, checkSize bool) { if b.hasHeader && b.rawHeader == nil { newlineIndex := bytes.IndexByte(input.Raw(), '\n') if newlineIndex != -1 { - b.rawHeader = input.Raw()[:newlineIndex] + b.rawHeader = input.Raw()[:newlineIndex+1] ctx.GetLogger().Infof("Get new header") } else { ctx.GetLogger().Infof("No header found")