MCPcopy Create free account
hub / github.com/apache/datafusion / parse_exists_subquery

Method parse_exists_subquery

datafusion/sql/src/expr/subquery.rs:27–46  ·  view source on GitHub ↗
(
        &self,
        subquery: Query,
        negated: bool,
        input_schema: &DFSchema,
        planner_context: &mut PlannerContext,
    )

Source from the content-addressed store, hash-verified

25
26impl<S: ContextProvider> SqlToRel<'_, S> {
27 pub(super) fn parse_exists_subquery(
28 &self,
29 subquery: Query,
30 negated: bool,
31 input_schema: &DFSchema,
32 planner_context: &mut PlannerContext,
33 ) -> Result<Expr> {
34 planner_context.append_outer_query_schema(input_schema.clone().into());
35 let sub_plan = self.query_to_plan(subquery, planner_context)?;
36 let outer_ref_columns = sub_plan.all_out_ref_exprs();
37 planner_context.pop_outer_query_schema();
38 Ok(Expr::Exists(Exists {
39 subquery: Subquery {
40 subquery: Arc::new(sub_plan),
41 outer_ref_columns,
42 spans: Spans::new(),
43 },
44 negated,
45 }))
46 }
47
48 pub(super) fn parse_in_subquery(
49 &self,

Callers 1

Calls 8

ExistsClass · 0.85
newFunction · 0.85
query_to_planMethod · 0.80
all_out_ref_exprsMethod · 0.80
intoMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected