val dataset = Seq(1).toDF scala> dataset.explain(true) == Parsed Logical Plan == LocalRelation [value#216] == Analyzed Logical Plan == value: int LocalRelation [value#216] == Optimized Logical Plan == LocalRelation [value#216] == Physical Plan == LocalTableScan [value#216]
LocalRelation is a leaf logical plan that allow functions like
take to be executed locally, i.e. without using Spark executors.
It can only be constructed with the output attributes being all resolved.
The size of the objects (in
statistics) is the sum of the default size of the attributes multiplied by the number of records.
LocalRelation is translated to LocalTableScanExec physical operator.