Skip to content

OverwriteByExpression Logical Command

OverwriteByExpression is a V2WriteCommand.

Creating Instance

OverwriteByExpression takes the following to be created:

OverwriteByExpression is created (using byName and byPosition utilities) when...FIXME

resolved

resolved: Boolean

resolved is true when outputResolved and delete expression are.

resolved is part of the LogicalPlan abstraction.

Creating OverwriteByExpression by Name

byName(
  table: NamedRelation,
  df: LogicalPlan,
  deleteExpr: Expression,
  writeOptions: Map[String, String] = Map.empty): OverwriteByExpression

byName creates a OverwriteByExpression with isByName enabled (true).

byName is used when:

  • DataFrameWriter is requested to save
  • DataFrameWriterV2 is requested to overwrite

Creating OverwriteByExpression by Position

byPosition(
  table: NamedRelation,
  query: LogicalPlan,
  deleteExpr: Expression,
  writeOptions: Map[String, String] = Map.empty): OverwriteByExpression

byPosition creates a OverwriteByExpression with isByName disabled (false).

byPosition is used: