From 2d48c53541ce10fa042f98f4439bf4432d188b18 Mon Sep 17 00:00:00 2001 From: DeluxeOwl Date: Tue, 3 Sep 2024 14:22:54 +0300 Subject: [PATCH] fix: added buffer size from config for json creator --- datasources/json/impl.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/datasources/json/impl.go b/datasources/json/impl.go index 4bd54659..e2abff28 100644 --- a/datasources/json/impl.go +++ b/datasources/json/impl.go @@ -9,6 +9,7 @@ import ( "github.com/valyala/fastjson" + "github.com/cube2222/octosql/config" "github.com/cube2222/octosql/execution" "github.com/cube2222/octosql/execution/files" "github.com/cube2222/octosql/octosql" @@ -25,7 +26,7 @@ func Creator(ctx context.Context, name string, options map[string]string) (physi fields := make(map[string]octosql.Type) sc := bufio.NewScanner(f) - sc.Buffer(nil, 1024*1024) + sc.Buffer(nil, config.FromContext(ctx).Files.JSON.MaxLineSizeBytes) var p fastjson.Parser i := 0