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

Method resolved_eq

datafusion/common/src/table_reference.rs:196–212  ·  view source on GitHub ↗

Compare with another [`TableReference`] as if both are resolved. This allows comparing across variants. If a field is not present in both variants being compared then it is ignored in the comparison. e.g. this allows a [`TableReference::Bare`] to be considered equal to a fully qualified [`TableReference::Full`] if the table names match.

(&self, other: &Self)

Source from the content-addressed store, hash-verified

194 /// e.g. this allows a [`TableReference::Bare`] to be considered equal to a
195 /// fully qualified [`TableReference::Full`] if the table names match.
196 pub fn resolved_eq(&self, other: &Self) -> bool {
197 match self {
198 TableReference::Bare { table } => **table == *other.table(),
199 TableReference::Partial { schema, table } => {
200 **table == *other.table() && other.schema().is_none_or(|s| *s == **schema)
201 }
202 TableReference::Full {
203 catalog,
204 schema,
205 table,
206 } => {
207 **table == *other.table()
208 && other.schema().is_none_or(|s| *s == **schema)
209 && other.catalog().is_none_or(|c| *c == **catalog)
210 }
211 }
212 }
213
214 /// Given a default catalog and schema, ensure this table reference is fully
215 /// resolved

Callers 3

extract_dml_filtersFunction · 0.80

Calls 3

tableMethod · 0.45
schemaMethod · 0.45
catalogMethod · 0.45

Tested by

no test coverage detected