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

Method insert_relation

datafusion/sql/src/resolve.rs:61–76  ·  view source on GitHub ↗

Record the reference to `relation`, if it's not a CTE reference.

(&mut self, relation: &ObjectName)

Source from the content-addressed store, hash-verified

59impl RelationVisitor {
60 /// Record the reference to `relation`, if it's not a CTE reference.
61 fn insert_relation(&mut self, relation: &ObjectName) -> ControlFlow<DataFusionError> {
62 match object_name_to_table_reference(
63 relation.clone(),
64 self.enable_ident_normalization,
65 ) {
66 Ok(relation) => {
67 if !self.relations.contains(&relation)
68 && !self.ctes_in_scope.contains(&relation)
69 {
70 self.relations.insert(relation);
71 }
72 ControlFlow::Continue(())
73 }
74 Err(e) => ControlFlow::Break(e),
75 }
76 }
77}
78
79impl Visitor for RelationVisitor {

Callers 3

pre_visit_relationMethod · 0.80
pre_visit_statementMethod · 0.80
visit_statementFunction · 0.80

Calls 4

cloneMethod · 0.45
containsMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected