From 4d285bf8ee529b21bb78c8aaa32aebcca0fc793e Mon Sep 17 00:00:00 2001 From: "Lei, HUANG" Date: Tue, 8 Sep 2026 21:14:33 +0800 Subject: [PATCH] docs: define scalar metric batch shape Document the exact timestamp, field, tag, and datatype-extension constraints used to determine scalar metric batching eligibility. Signed-off-by: Lei, HUANG --- src/servers/src/pending_rows_batcher.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/servers/src/pending_rows_batcher.rs b/src/servers/src/pending_rows_batcher.rs index 2f55b299c46..40937127a73 100644 --- a/src/servers/src/pending_rows_batcher.rs +++ b/src/servers/src/pending_rows_batcher.rs @@ -453,6 +453,8 @@ fn batch_key_from_ctx(ctx: &QueryContextRef) -> BatchKey { /// Returns whether all non-empty inserts in `requests` can use the scalar metric batcher. /// +/// A scalar metric schema has exactly one millisecond or nanosecond timestamp column, exactly one +/// `Float64` field column, and zero or more `String` tag columns, without datatype extensions. /// Empty inserts are ignored to match [`PendingRowsBatcher::submit`] filtering, and a request /// without rows is not batchable. Valid schemas outside the scalar metric shape return `false`, /// while malformed scalar row widths or value variants return an error before callers perform DDL.