public class SQLConf
extends Object
implements scala.Serializable
In the presence of a SQLContext, these can be set and queried by passing SET commands into Spark SQL's query functions (i.e. sql()). Otherwise, users of this class can modify the hints by programmatically calling the setters and getters of this class.
SQLConf is thread-safe (internally synchronized, so safe to be used in multiple threads).
Modifier and Type | Class and Description |
---|---|
static class |
SQLConf.Deprecated$ |
Constructor and Description |
---|
SQLConf() |
Modifier and Type | Method and Description |
---|---|
static String |
AUTO_BROADCASTJOIN_THRESHOLD() |
int |
autoBroadcastJoinThreshold()
Upper bound on the sizes (in bytes) of the tables qualified for the auto conversion to
a broadcast value during the physical executions of join operations.
|
static String |
BROADCAST_TIMEOUT() |
int |
broadcastTimeout()
Timeout in seconds for the broadcast wait time in hash join
|
void |
clear() |
static String |
CODEGEN_ENABLED() |
boolean |
codegenEnabled()
When set to true, Spark SQL will use the Scala compiler at runtime to generate custom bytecode
that evaluates expressions found in queries.
|
static String |
COLUMN_BATCH_SIZE() |
static String |
COLUMN_NAME_OF_CORRUPT_RECORD() |
int |
columnBatchSize()
The number of rows that will be
|
String |
columnNameOfCorruptRecord() |
static String |
COMPRESS_CACHED() |
static String |
DATAFRAME_EAGER_ANALYSIS() |
boolean |
dataFrameEagerAnalysis() |
static String |
DEFAULT_DATA_SOURCE_NAME() |
static String |
DEFAULT_SIZE_IN_BYTES() |
String |
defaultDataSourceName() |
long |
defaultSizeInBytes()
The default size in bytes to assign to a logical operator's estimation statistics.
|
String |
dialect()
The SQL dialect that is used when parsing queries.
|
static String |
DIALECT() |
static String |
EXTERNAL_SORT() |
boolean |
externalSortEnabled()
When true the planner will use the external sort, which may spill to disk.
|
scala.collection.immutable.Map<String,String> |
getAllConfs()
Return all the configuration properties that have been set (i.e.
|
String |
getConf(String key)
Return the value of Spark SQL configuration property for the given key.
|
String |
getConf(String key,
String defaultValue)
Return the value of Spark SQL configuration property for the given key.
|
static String |
IN_MEMORY_PARTITION_PRUNING() |
boolean |
inMemoryPartitionPruning()
When set to true, partition pruning for in-memory columnar tables is enabled.
|
boolean |
isParquetBinaryAsString()
When set to true, we always treat byte arrays in Parquet files as strings.
|
boolean |
isParquetINT96AsTimestamp()
When set to true, we always treat INT96Values in Parquet files as timestamp.
|
int |
numShufflePartitions()
Number of partitions to use for shuffle operators.
|
static String |
PARQUET_BINARY_AS_STRING() |
static String |
PARQUET_CACHE_METADATA() |
static String |
PARQUET_COMPRESSION() |
static String |
PARQUET_FILTER_PUSHDOWN_ENABLED() |
static String |
PARQUET_INT96_AS_TIMESTAMP() |
static String |
PARQUET_USE_DATA_SOURCE_API() |
String |
parquetCompressionCodec()
The compression codec for writing to a Parquetfile
|
boolean |
parquetFilterPushDown()
When true predicates will be passed to the parquet record reader when possible.
|
boolean |
parquetUseDataSourceApi()
When true uses Parquet implementation based on data source API
|
static String |
SCHEMA_STRING_LENGTH_THRESHOLD() |
int |
schemaStringLengthThreshold() |
void |
setConf(java.util.Properties props)
Set Spark SQL configuration properties.
|
void |
setConf(String key,
String value)
Set the given Spark SQL configuration property.
|
static String |
SHUFFLE_PARTITIONS() |
static String |
THRIFTSERVER_POOL() |
void |
unsetConf(String key) |
boolean |
useCompression()
When true tables cached using the in-memory columnar caching will be compressed.
|
public static String COMPRESS_CACHED()
public static String COLUMN_BATCH_SIZE()
public static String IN_MEMORY_PARTITION_PRUNING()
public static String AUTO_BROADCASTJOIN_THRESHOLD()
public static String DEFAULT_SIZE_IN_BYTES()
public static String SHUFFLE_PARTITIONS()
public static String CODEGEN_ENABLED()
public static String DIALECT()
public static String PARQUET_BINARY_AS_STRING()
public static String PARQUET_INT96_AS_TIMESTAMP()
public static String PARQUET_CACHE_METADATA()
public static String PARQUET_COMPRESSION()
public static String PARQUET_FILTER_PUSHDOWN_ENABLED()
public static String PARQUET_USE_DATA_SOURCE_API()
public static String COLUMN_NAME_OF_CORRUPT_RECORD()
public static String BROADCAST_TIMEOUT()
public static String EXTERNAL_SORT()
public static String THRIFTSERVER_POOL()
public static String DEFAULT_DATA_SOURCE_NAME()
public static String SCHEMA_STRING_LENGTH_THRESHOLD()
public static String DATAFRAME_EAGER_ANALYSIS()
public String dialect()
When using a HiveContext, this value defaults to 'hiveql', which uses the Hive 0.12.0 HiveQL parser. Users can change this to 'sql' if they want to run queries that aren't supported by HiveQL (e.g., SELECT 1).
Note that the choice of dialect does not affect things like what tables are available or how query execution is performed.
public boolean useCompression()
public String parquetCompressionCodec()
public int columnBatchSize()
public int numShufflePartitions()
public boolean parquetFilterPushDown()
public boolean parquetUseDataSourceApi()
public boolean externalSortEnabled()
public boolean codegenEnabled()
Defaults to false as this feature is currently experimental.
public int autoBroadcastJoinThreshold()
Hive setting: hive.auto.convert.join.noconditionaltask.size, whose default value is 10000.
public long defaultSizeInBytes()
autoBroadcastJoinThreshold
, hence any logical operator
without a properly implemented estimation of this statistic will not be incorrectly broadcasted
in joins.public boolean isParquetBinaryAsString()
public boolean isParquetINT96AsTimestamp()
public boolean inMemoryPartitionPruning()
public String columnNameOfCorruptRecord()
public int broadcastTimeout()
public String defaultDataSourceName()
public int schemaStringLengthThreshold()
public boolean dataFrameEagerAnalysis()
public void setConf(java.util.Properties props)
public void setConf(String key, String value)
public String getConf(String key)
public String getConf(String key, String defaultValue)
defaultValue
.public scala.collection.immutable.Map<String,String> getAllConfs()
public void unsetConf(String key)
public void clear()