fix: move table rows out of the endpoint response and pin the EE table reader fix

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Guilhem Lemouel
2026-11-30 01:40:22 -08:00
co-authored by Claude Opus 5.5
parent 7fb13a8628
commit a422b6ca3b
2 changed files with 9 additions and 5 deletions
+1 -1
View File
@@ -1 +1 @@
a403f3ce12fd150dd649098e61562eda1e6a4d81
a6ef934db465b0e583c7dba1b1e20394c61fc791
@@ -324,15 +324,19 @@ async fn query_s3_table(ctx: &Ctx<'_>, args: &Value) -> ToolResult {
// One row past the page says whether more rows match.
params.push(("limit", Some((limit + 1).to_string())));
let file = path_enc(key);
let chunk = ctx
let mut chunk = ctx
.get(&query_path(
ctx.ws(&format!("job_helpers/{endpoint}/{file}")),
&params,
))
.await?;
let mut columns = array(chunk.get("columns")).to_vec();
let mut column_types = array(chunk.get("column_types")).to_vec();
let mut rows = array(chunk.get("rows")).to_vec();
let mut take = |field: &str| match chunk.get_mut(field).map(Value::take) {
Some(Value::Array(values)) => values,
_ => vec![],
};
let mut columns = take("columns");
let mut column_types = take("column_types");
let mut rows = take("rows");
let more_rows = rows.len() as u64 > limit;
rows.truncate(limit as usize);
if let Some(wanted) = args