@@ -7185,18 +7185,19 @@ impl<M: cranelift_module::Module> Codegen<M> {
71857185 return v;
71867186 }
71877187
7188− // Special case: `run *source` — the explicit query→data boundary. Reads
7189− // the whole source into memory (a full in-memory read, reported by the
7190− // build-time Advice) and wraps the materialized relation as
7191− // `IO (Vec a)` via `knot_relation_run_io`.
7192− if Self::query_form_name(func_expr) == Some("run")
7188+ // Special case: `run *source` / `run1 *source` — the explicit query→data
7189+ // boundary. Reads the whole source into memory (a full in-memory read,
7190+ // reported by the build-time Warning) and wraps the materialized
7191+ // relation as `IO (Vec a)` / `IO a`.
7192+ if matches!(Self::query_form_name(func_expr), Some("run") | Some("run1"))
71937193 && args.len() == 1
71947194 && !user_shadows_special
71957195 && let Some(source_name) = self.resolve_source(args[0])
71967196 && let Some(schema) = self.source_schemas.get(&source_name).cloned()
71977197 {
7198+ let fn_name = Self::query_form_name(func_expr).unwrap();
71987199 self.in_memory_source_reads
7199− .insert(source_name.clone(), (args[0].span, "base.run".to_string()));
7200+ .insert(source_name.clone(), (args[0].span, format!("base.{fn_name}")));
72007201 self.emit_stm_track_read(builder, &source_name);
72017202 let (name_ptr, name_len) = self.string_ptr(builder, &source_name);
72027203 let (schema_ptr, schema_len) = self.string_ptr(builder, &schema);
@@ -7205,7 +7206,9 @@ impl<M: cranelift_module::Module> Codegen<M> {
72057206 "knot_source_read",
72067207 &[db, name_ptr, name_len, schema_ptr, schema_len],
72077208 );
7208− return self.call_rt(builder, "knot_relation_run_io", &[rel]);
7209+ // run → IO (Vec a); run1 → IO a (the single row).
7210+ let rt = if fn_name == "run1" { "knot_relation_run1" } else { "knot_relation_run_io" };
7211+ return self.call_rt(builder, rt, &[rel]);
72097212 }
72107213
72117214 // Special case: count *rel → SQL COUNT(*) (bare `count` or `base.count`)