Search in sources :

Example 1 with ParserInterface

use of org.apache.spark.sql.catalyst.parser.ParserInterface in project iceberg by apache.

the class Spark3Util method catalogAndIdentifier.

public static CatalogAndIdentifier catalogAndIdentifier(SparkSession spark, String name, CatalogPlugin defaultCatalog) throws ParseException {
    ParserInterface parser = spark.sessionState().sqlParser();
    Seq<String> multiPartIdentifier = parser.parseMultipartIdentifier(name).toIndexedSeq();
    List<String> javaMultiPartIdentifier = JavaConverters.seqAsJavaList(multiPartIdentifier);
    return catalogAndIdentifier(spark, javaMultiPartIdentifier, defaultCatalog);
}
Also used : ParserInterface(org.apache.spark.sql.catalyst.parser.ParserInterface)

Aggregations

ParserInterface (org.apache.spark.sql.catalyst.parser.ParserInterface)1