org.apache.spark.sql.catalyst.catalog.CatalogTypes.TablePartitionSpec Scala Examples
The following examples show how to use org.apache.spark.sql.catalyst.catalog.CatalogTypes.TablePartitionSpec.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
Example 1
Source File: ExternalCatalogUtils.scala From sparkoscope with Apache License 2.0 | 5 votes |
package org.apache.spark.sql.catalyst.catalog import org.apache.hadoop.fs.Path import org.apache.hadoop.util.Shell import org.apache.spark.sql.catalyst.catalog.CatalogTypes.TablePartitionSpec object ExternalCatalogUtils { // This duplicates default value of Hive `ConfVars.DEFAULTPARTITIONNAME`, since catalyst doesn't // depend on Hive. val DEFAULT_PARTITION_NAME = "__HIVE_DEFAULT_PARTITION__" ////////////////////////////////////////////////////////////////////////////////////////////////// // The following string escaping code is mainly copied from Hive (o.a.h.h.common.FileUtils). ////////////////////////////////////////////////////////////////////////////////////////////////// val charToEscape = { val bitSet = new java.util.BitSet(128) def maskCredentials(options: Map[String, String]): Map[String, String] = { options.map { case (key, _) if key.toLowerCase == "password" => (key, "###") case (key, value) if key.toLowerCase == "url" && value.toLowerCase.contains("password") => (key, "###") case o => o } } }
Example 2
Source File: CarbonExpressions.scala From carbondata with Apache License 2.0 | 5 votes |
package org.apache.spark.sql import org.apache.spark.sql.catalyst.TableIdentifier import org.apache.spark.sql.catalyst.analysis.UnresolvedRelation import org.apache.spark.sql.catalyst.catalog.CatalogTypes.TablePartitionSpec import org.apache.spark.sql.catalyst.expressions.{Attribute, Cast, Expression, ScalaUDF} import org.apache.spark.sql.catalyst.plans.logical.{LogicalPlan, SubqueryAlias} import org.apache.spark.sql.execution.command.DescribeTableCommand import org.apache.spark.sql.types.DataType object CarbonScalaUDF { def unapply(expression: Expression): Option[(ScalaUDF)] = { expression match { case a: ScalaUDF => Some(a) case _ => None } } } }
Example 3
Source File: ExternalCatalogUtils.scala From multi-tenancy-spark with Apache License 2.0 | 5 votes |
package org.apache.spark.sql.catalyst.catalog import org.apache.hadoop.fs.Path import org.apache.hadoop.util.Shell import org.apache.spark.sql.catalyst.catalog.CatalogTypes.TablePartitionSpec object ExternalCatalogUtils { // This duplicates default value of Hive `ConfVars.DEFAULTPARTITIONNAME`, since catalyst doesn't // depend on Hive. val DEFAULT_PARTITION_NAME = "__HIVE_DEFAULT_PARTITION__" ////////////////////////////////////////////////////////////////////////////////////////////////// // The following string escaping code is mainly copied from Hive (o.a.h.h.common.FileUtils). ////////////////////////////////////////////////////////////////////////////////////////////////// val charToEscape = { val bitSet = new java.util.BitSet(128) def maskCredentials(options: Map[String, String]): Map[String, String] = { options.map { case (key, _) if key.toLowerCase == "password" => (key, "###") case (key, value) if key.toLowerCase == "url" && value.toLowerCase.contains("password") => (key, "###") case o => o } } }