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

Method derive_with_dialect_alias

datafusion/sql/src/unparser/plan.rs:359–377  ·  view source on GitHub ↗
(
        &self,
        alias: &str,
        plan: &LogicalPlan,
        relation: &mut RelationBuilder,
        lateral: bool,
        columns: Vec<Ident>,
    )

Source from the content-addressed store, hash-verified

357 }
358
359 fn derive_with_dialect_alias(
360 &self,
361 alias: &str,
362 plan: &LogicalPlan,
363 relation: &mut RelationBuilder,
364 lateral: bool,
365 columns: Vec<Ident>,
366 ) -> Result<()> {
367 if self.dialect.requires_derived_table_alias() || !columns.is_empty() {
368 self.derive(
369 plan,
370 relation,
371 Some(self.new_table_alias(alias.to_string(), columns)),
372 lateral,
373 )
374 } else {
375 self.derive(plan, relation, None, lateral)
376 }
377 }
378
379 /// Projection unparsing when [`super::dialect::Dialect::unnest_as_lateral_flatten`] is enabled:
380 /// Snowflake-style `LATERAL FLATTEN` for unnest (not other dialect spellings).

Callers 1

Calls 5

deriveMethod · 0.80
new_table_aliasMethod · 0.80
is_emptyMethod · 0.45
to_stringMethod · 0.45

Tested by

no test coverage detected