From 44100f4c7dd227570e1387b698f465d75b8350ce Mon Sep 17 00:00:00 2001 From: Dennis Zhuang Date: Fri, 30 Aug 2024 17:37:12 +0800 Subject: [PATCH] feat: grpc writing supports TTL hint --- src/operator/src/insert.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/operator/src/insert.rs b/src/operator/src/insert.rs index 90edee015705..28ecdf5d1108 100644 --- a/src/operator/src/insert.rs +++ b/src/operator/src/insert.rs @@ -45,7 +45,7 @@ use store_api::metric_engine_consts::{ }; use store_api::mito_engine_options::{APPEND_MODE_KEY, MERGE_MODE_KEY}; use store_api::storage::{RegionId, TableId}; -use table::requests::InsertRequest as TableInsertRequest; +use table::requests::{InsertRequest as TableInsertRequest, TTL_KEY}; use table::table_reference::TableReference; use table::TableRef; @@ -659,6 +659,9 @@ impl Inserter { if let Some(merge_mode) = ctx.extension(MERGE_MODE_KEY) { hint_options.push((MERGE_MODE_KEY, merge_mode)); } + if let Some(ttl) = ctx.extension(TTL_KEY) { + hint_options.push((TTL_KEY, ttl)); + } hint_options.as_slice() } // Set append_mode to true for log table.