Class IdentifierHelper
Object
org.apache.spark.sql.pipelines.graph.IdentifierHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
assertIsFullyQualifiedForCreate
(org.apache.spark.sql.catalyst.TableIdentifier identifier) Assert whether the identifier is properly fully qualified when creating a dataset.static void
assertIsFullyQualifiedForRead
(org.apache.spark.sql.catalyst.TableIdentifier identifier) Assert whether the identifier is properly qualified when reading a dataset in a pipeline.static org.apache.spark.sql.catalyst.TableIdentifier
fullyQualifyIdentifier
(org.apache.spark.sql.catalyst.TableIdentifier maybeFullyQualifiedIdentifier, scala.Option<String> currentCatalog, scala.Option<String> currentDatabase) Fully qualifies provided identifier with provided catalog & schema.static boolean
isPathIdentifier
(org.apache.spark.sql.classic.SparkSession spark, org.apache.spark.sql.catalyst.TableIdentifier identifier) Return true if the identifier should be resolved as a path-based reference (i.e.,datasource
.path
).static boolean
isSinglePartIdentifier
(org.apache.spark.sql.catalyst.TableIdentifier identifier) Return whether the input identifier is a single-part identifier.static String
toQuotedString
(scala.collection.immutable.Seq<String> nameParts) Returns the quoted string for the name parts.static org.apache.spark.sql.catalyst.TableIdentifier
toTableIdentifier
(org.apache.spark.sql.catalyst.plans.logical.LogicalPlan table) Returns the table identifier constructed from the logical plan.static org.apache.spark.sql.catalyst.TableIdentifier
toTableIdentifier
(scala.collection.immutable.Seq<String> nameParts) Returns the table identifier constructed from the name parts.
-
Constructor Details
-
IdentifierHelper
public IdentifierHelper()
-
-
Method Details
-
toQuotedString
Returns the quoted string for the name parts.- Parameters:
nameParts
- the dataset name parts.- Returns:
- the quoted string for the name parts.
-
toTableIdentifier
public static org.apache.spark.sql.catalyst.TableIdentifier toTableIdentifier(scala.collection.immutable.Seq<String> nameParts) throws UnsupportedOperationException Returns the table identifier constructed from the name parts.- Parameters:
nameParts
- the dataset name parts.- Returns:
- the table identifier constructed from the name parts.
- Throws:
UnsupportedOperationException
-
toTableIdentifier
public static org.apache.spark.sql.catalyst.TableIdentifier toTableIdentifier(org.apache.spark.sql.catalyst.plans.logical.LogicalPlan table) Returns the table identifier constructed from the logical plan.- Parameters:
table
- the logical plan.- Returns:
- the table identifier constructed from the logical plan.
-
isSinglePartIdentifier
public static boolean isSinglePartIdentifier(org.apache.spark.sql.catalyst.TableIdentifier identifier) Return whether the input identifier is a single-part identifier. -
isPathIdentifier
public static boolean isPathIdentifier(org.apache.spark.sql.classic.SparkSession spark, org.apache.spark.sql.catalyst.TableIdentifier identifier) Return true if the identifier should be resolved as a path-based reference (i.e.,datasource
.path
).- Parameters:
spark
- (undocumented)identifier
- (undocumented)- Returns:
- (undocumented)
-
fullyQualifyIdentifier
public static org.apache.spark.sql.catalyst.TableIdentifier fullyQualifyIdentifier(org.apache.spark.sql.catalyst.TableIdentifier maybeFullyQualifiedIdentifier, scala.Option<String> currentCatalog, scala.Option<String> currentDatabase) Fully qualifies provided identifier with provided catalog & schema. -
assertIsFullyQualifiedForCreate
public static void assertIsFullyQualifiedForCreate(org.apache.spark.sql.catalyst.TableIdentifier identifier) Assert whether the identifier is properly fully qualified when creating a dataset. -
assertIsFullyQualifiedForRead
public static void assertIsFullyQualifiedForRead(org.apache.spark.sql.catalyst.TableIdentifier identifier) Assert whether the identifier is properly qualified when reading a dataset in a pipeline.
-