From 89943598a0b3c55d268e7dd51bd4199723a20c9d Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 16 Jun 2025 00:39:31 +0300 Subject: initial faster readfile --- internal/server/handlers/readcommand.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'internal/server') diff --git a/internal/server/handlers/readcommand.go b/internal/server/handlers/readcommand.go index 44ba9e4..5f7da86 100644 --- a/internal/server/handlers/readcommand.go +++ b/internal/server/handlers/readcommand.go @@ -49,7 +49,8 @@ func (r *readCommand) Start(ctx context.Context, ltx lcontext.LContext, // In serverless mode, can also read data from pipe // e.g.: grep foo bar.log | dmap 'from STATS select ...' - if r.isInputFromPipe() { + // Only read from stdin if no file is specified AND input is from pipe + if (args[1] == "" || args[1] == "-") && r.isInputFromPipe() { dlog.Server.Debug("Reading data from stdin pipe") // Empty file path and globID "-" represents reading from the stdin pipe. r.read(ctx, ltx, "", "-", re) -- cgit v1.2.3