MCPcopy Create free account
hub / github.com/PRQL/prql / load_names

Method load_names

prqlc/prqlc/src/sql/pq/context.rs:193–207  ·  view source on GitHub ↗
(
        &mut self,
        pipeline: &[SqlTransform],
        output_cols: Vec<RelationColumn>,
    )

Source from the content-addressed store, hash-verified

191 }
192
193 pub(super) fn load_names(
194 &mut self,
195 pipeline: &[SqlTransform],
196 output_cols: Vec<RelationColumn>,
197 ) {
198 let output_cids = self.determine_select_columns(pipeline);
199
200 assert_eq!(output_cids.len(), output_cols.len());
201
202 for (cid, col) in zip(output_cids.iter(), output_cols) {
203 if let RelationColumn::Single(Some(name)) = col {
204 self.column_names.insert(*cid, name);
205 }
206 }
207 }
208
209 pub(super) fn determine_select_columns(&self, pipeline: &[SqlTransform]) -> Vec<CId> {
210 use SqlTransform::Super;

Callers 1

compile_relationFunction · 0.80

Calls 3

iterMethod · 0.80
insertMethod · 0.45

Tested by

no test coverage detected