Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -435,11 +435,10 @@ private[kafka010] class KafkaOffsetReaderConsumer(

// Calculate offset ranges
val offsetRangesBase = untilPartitionOffsets.keySet.map { tp =>
val fromOffset = fromPartitionOffsets.get(tp).getOrElse {
val fromOffset = fromPartitionOffsets.getOrElse(tp,
// This should not happen since topicPartitions contains all partitions not in
// fromPartitionOffsets
throw new IllegalStateException(s"$tp doesn't have a from offset")
}
throw new IllegalStateException(s"$tp doesn't have a from offset"))
val untilOffset = untilPartitionOffsets(tp)
KafkaOffsetRange(tp, fromOffset, untilOffset, None)
}.toSeq
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ private[spark] object KubernetesVolumeUtils {
KubernetesVolumeSpec(
volumeName = volumeName,
mountPath = properties(pathKey),
mountSubPath = properties.get(subPathKey).getOrElse(""),
mountSubPath = properties.getOrElse(subPathKey, ""),
mountReadOnly = properties.get(readOnlyKey).exists(_.toBoolean),
volumeConf = parseVolumeSpecificConf(properties, volumeType, volumeName))
}.toSeq
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ trait SupportQueryContext extends Expression with Serializable {

def initQueryContext(): Option[SQLQueryContext]

def getContextOrNull(): SQLQueryContext = queryContext.getOrElse(null)
def getContextOrNull(): SQLQueryContext = queryContext.orNull

def getContextOrNullCode(ctx: CodegenContext, withErrorContext: Boolean = true): String = {
if (withErrorContext && queryContext.isDefined) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,10 @@ class OrcFileFormat
// Should always be set by FileSourceScanExec creating this.
// Check conf before checking option, to allow working around an issue by changing conf.
val enableVectorizedReader = sqlConf.orcVectorizedReaderEnabled &&
options.get(FileFormat.OPTION_RETURNING_BATCH)
.getOrElse {
throw new IllegalArgumentException(
"OPTION_RETURNING_BATCH should always be set for OrcFileFormat. " +
"To workaround this issue, set spark.sql.orc.enableVectorizedReader=false.")
}
options.getOrElse(FileFormat.OPTION_RETURNING_BATCH,
throw new IllegalArgumentException(
"OPTION_RETURNING_BATCH should always be set for OrcFileFormat. " +
"To workaround this issue, set spark.sql.orc.enableVectorizedReader=false."))
.equals("true")
if (enableVectorizedReader) {
// If the passed option said that we are to return batches, we need to also be able to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,10 @@ class ParquetFileFormat
// Should always be set by FileSourceScanExec creating this.
// Check conf before checking option, to allow working around an issue by changing conf.
val returningBatch = sparkSession.sessionState.conf.parquetVectorizedReaderEnabled &&
options.get(FileFormat.OPTION_RETURNING_BATCH)
.getOrElse {
throw new IllegalArgumentException(
"OPTION_RETURNING_BATCH should always be set for ParquetFileFormat. " +
"To workaround this issue, set spark.sql.parquet.enableVectorizedReader=false.")
}
options.getOrElse(FileFormat.OPTION_RETURNING_BATCH,
throw new IllegalArgumentException(
"OPTION_RETURNING_BATCH should always be set for ParquetFileFormat. " +
"To workaround this issue, set spark.sql.parquet.enableVectorizedReader=false."))
.equals("true")
if (returningBatch) {
// If the passed option said that we are to return batches, we need to also be able to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,8 @@ class AsyncProgressTrackingMicroBatchExecution(
private def validateAndGetTrigger(): TriggerExecutor = {
// validate that the pipeline is using a supported sink
if (!extraOptions
.get(
ASYNC_PROGRESS_TRACKING_OVERRIDE_SINK_SUPPORT_CHECK
)
.getOrElse("false")
.getOrElse(
ASYNC_PROGRESS_TRACKING_OVERRIDE_SINK_SUPPORT_CHECK, "false")
.toBoolean) {
try {
plan.sink.name() match {
Expand Down