mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-12-03 16:10:37 +00:00
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:
co-authored by
Claude Opus 5.5
parent
7fb13a8628
commit
a422b6ca3b
@@ -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}")),
|
||||
¶ms,
|
||||
))
|
||||
.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
|
||||
|
||||
Reference in New Issue
Block a user