Skip to content

LeafNode — Base Logical Operator with No Child Operators and Optional Statistics

LeafNode is the base of <> that have no child operators.

LeafNode that wants to survive analysis has to define <> as it throws an UnsupportedOperationException by default.

[[extensions]] .LeafNodes (Direct Implementations) [cols="1,2",options="header",width="100%"] |=== | LeafNode | Description

| <> | [[AnalysisBarrier]]

| <> | [[DataSourceV2Relation]]

| <> | [[ExternalRDD]]

| hive/HiveTableRelation.md[HiveTableRelation] | [[HiveTableRelation]]

| InMemoryRelation | [[InMemoryRelation]]

| <> | [[LocalRelation]]

| <> | [[LogicalRDD]]

| <> | [[LogicalRelation]]

| <> | [[OneRowRelation]]

| <> | [[Range]]

| <> | [[UnresolvedCatalogRelation]]

| <> | [[UnresolvedInlineTable]]

| <> | [[UnresolvedRelation]]

| <> | [[UnresolvedTableValuedFunction]] |===

=== [[computeStats]] Computing Statistics -- computeStats Method

[source, scala]

computeStats(): Statistics

computeStats simply throws an UnsupportedOperationException.

Note

Logical operators (e.g. ExternalRDD, LogicalRDD and DataSourceV2Relation), or relations (e.g. HadoopFsRelation or BaseRelation), use spark.sql.defaultSizeInBytes internal property for the default estimated size if the statistics could not be computed.

computeStats is used when SizeInBytesOnlyStatsPlanVisitor uses the default case to compute the size statistic (in bytes) for a logical operator.


Last update: 2020-11-07