Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
d5798fd
Adds a v1 fallback writer implementation for v2 data source codepaths
brkyvz Aug 3, 2019
59094e9
Update WriteToDataSourceV2Exec.scala
brkyvz Aug 4, 2019
1587d31
Merge branch 'master' of github.com:apache/spark into v1WriteFallback
brkyvz Aug 5, 2019
5aed803
some changes but doubtful
brkyvz Aug 5, 2019
bcdf8c5
Merge branch 'master' of github.com:apache/spark into v1WriteFallback
brkyvz Aug 7, 2019
a1284a1
Revert "some changes but doubtful"
brkyvz Aug 7, 2019
ef2ec72
Address comments and separate whatever's possible
brkyvz Aug 7, 2019
335a92d
update docs
brkyvz Aug 7, 2019
3e35d5c
minor move for better separation
brkyvz Aug 7, 2019
41c4c0a
use implicit class
brkyvz Aug 7, 2019
138f2b9
use insertable relation instead
brkyvz Aug 7, 2019
078d0f1
Merge branch 'master' of github.com:apache/spark into v1WriteFallback
brkyvz Aug 8, 2019
d816824
address comments
brkyvz Aug 8, 2019
c62a60d
Merge branch 'master' of github.com:apache/spark into v1WriteFallback
brkyvz Aug 12, 2019
cfdb036
Added basic tests
brkyvz Aug 12, 2019
442836b
Update V1WriteBuilder.scala
brkyvz Aug 12, 2019
7396f24
fix tests
brkyvz Aug 14, 2019
20b906d
Merge branch 'v1WriteFallback' of github.com:brkyvz/spark into v1Writ…
brkyvz Aug 14, 2019
a93bf8c
Update V1WriteBuilder.scala
brkyvz Aug 14, 2019
83dbd78
Merge branch 'master' into v1WriteFallback
brkyvz Aug 14, 2019
9bfb76e
Merge branch 'master' of github.com:apache/spark into v1WriteFallback
brkyvz Aug 20, 2019
00347ee
Add table capability to do V1_BATCH_WRITE
brkyvz Aug 20, 2019
d4d6276
test refactor
brkyvz Aug 20, 2019
749ae85
Update V1WriteFallbackSuite.scala
brkyvz Aug 20, 2019
27598ce
address nits
brkyvz Aug 21, 2019
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 @@ -169,10 +169,10 @@ object DataSourceV2Strategy extends Strategy with PredicateHelper {
catalog match {
case staging: StagingTableCatalog =>
AtomicCreateTableAsSelectExec(
staging, ident, parts, planLater(query), props, writeOptions, ifNotExists) :: Nil
staging, ident, parts, query, planLater(query), props, writeOptions, ifNotExists) :: Nil
case _ =>
CreateTableAsSelectExec(
catalog, ident, parts, planLater(query), props, writeOptions, ifNotExists) :: Nil
catalog, ident, parts, query, planLater(query), props, writeOptions, ifNotExists) :: Nil
}

case ReplaceTable(catalog, ident, schema, parts, props, orCreate) =>
Expand All @@ -191,6 +191,7 @@ object DataSourceV2Strategy extends Strategy with PredicateHelper {
staging,
ident,
parts,
query,
planLater(query),
props,
writeOptions,
Expand All @@ -200,14 +201,15 @@ object DataSourceV2Strategy extends Strategy with PredicateHelper {
catalog,
ident,
parts,
query,
planLater(query),
props,
writeOptions,
orCreate = orCreate) :: Nil
}

case AppendData(r: DataSourceV2Relation, query, _) =>
AppendDataExec(r.table.asWritable, r.options, planLater(query)) :: Nil

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we reuse the v2 CreateTableAsSelectExec for v1 fallback, but not AppendDataExec?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because table creation happens after certain operations with side effects in CTAS and RTAS.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is because CTAS and RTAS plans don't have a table instance. CTAS and RTAS create a table at runtime and then write to it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This explains why we must reuse CreateTableAsSelectExec for v1 fallback, but why can't we reuse AppendDataExec for v1 fallback as well?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just cleaner to have a separation of which code path was used. (Shows up separately in the SQL tab, etc)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If end-users look at the SQL tab and see AppendDataExecV1, they would expect to see v1 version of CTAS physical plan as well, and may report a bug if they don't see it.

BTW I think there are other ways to implement this feature (users know if v1 fallback is triggered from SQL tab), e.g. we can use SQLMetrics to report it, which can be updated at runtime and support CTAS as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think most (98%) of Spark users already don't know what the physical nodes stand for, etc. I was thinking of using metrics as well. We just wanted to keep the nodes separate, because the semantics are a bit different for things like OverwriteByExpression, where the source's implementation of the Overwrite + Append (v2 behavior) may not be atomic, etc

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point on having different physical nodes for different semantics. It seems to me that the semantic of append is the same between v1 and v2. Shall we reuse AppendDataExec? Then we can make a good story: If semantic is the same, reuse the v2 plan (CREATE TABLE, CTAS, APPEND). Otherwise, create a new physical node (OVERWRITE).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea to use the same physical plan node when the semantics match, but I'm not sure that it is possible to make strong guarantees about not changing v1 if we do. The problem is that there are multiple v1 plan nodes for the same operation, which could have slightly different behavior.

We could take the time to inspect the v1 implementations and convert, but that adds risk and takes time. It also isn't needed to migrate to v2, and wouldn't speed up the migration, unless I'm missing something. So it probably doesn't provide enough value to make doing it worth while.

AppendDataExec(r.table.asWritable, r.options, query, planLater(query)) :: Nil

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that falling back to v1 should use different plan nodes so that users can see that the v1 write API is used instead of v2. It would also help keep concerns separated in the exec nodes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's gonna require a separation at the catalog level

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We talked about this separately and I think this is okay for now. In the future, we can add a separate Write produced by the builder (like Scan in the read side) and use that to use a separate plan.


case OverwriteByExpression(r: DataSourceV2Relation, deleteExpr, query, _) =>
// fail if any filter cannot be converted. correctness depends on removing all matching data.
Expand All @@ -217,7 +219,7 @@ object DataSourceV2Strategy extends Strategy with PredicateHelper {
}.toArray

OverwriteByExpressionExec(
r.table.asWritable, filters, r.options, planLater(query)) :: Nil
r.table.asWritable, filters, r.options, query, planLater(query)) :: Nil

case OverwritePartitionsDynamic(r: DataSourceV2Relation, query, _) =>
OverwritePartitionsDynamicExec(r.table.asWritable, r.options, planLater(query)) :: Nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,17 @@ import org.apache.spark.{SparkEnv, SparkException, TaskContext}
import org.apache.spark.executor.CommitDeniedException
import org.apache.spark.internal.Logging
import org.apache.spark.rdd.RDD
import org.apache.spark.sql.{Dataset, SaveMode}
import org.apache.spark.sql.catalog.v2.{Identifier, StagingTableCatalog, TableCatalog}
import org.apache.spark.sql.catalog.v2.expressions.Transform
import org.apache.spark.sql.catalyst.InternalRow
import org.apache.spark.sql.catalyst.analysis.{CannotReplaceMissingTableException, NoSuchTableException, TableAlreadyExistsException}
import org.apache.spark.sql.catalyst.expressions.Attribute
import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan
import org.apache.spark.sql.execution.{SparkPlan, UnaryExecNode}
import org.apache.spark.sql.sources.{AlwaysTrue, Filter}
import org.apache.spark.sql.sources.{AlwaysTrue, CreatableRelationProvider, Filter}
import org.apache.spark.sql.sources.v2.{StagedTable, SupportsWrite}
import org.apache.spark.sql.sources.v2.writer.{BatchWrite, DataWriterFactory, SupportsDynamicOverwrite, SupportsOverwrite, SupportsTruncate, WriteBuilder, WriterCommitMessage}
import org.apache.spark.sql.sources.v2.writer.{BatchWrite, DataWriterFactory, SupportsDynamicOverwrite, SupportsOverwrite, SupportsTruncate, V1WriteBuilder, WriteBuilder, WriterCommitMessage}
import org.apache.spark.sql.util.CaseInsensitiveStringMap
import org.apache.spark.util.{LongAccumulator, Utils}

Expand Down Expand Up @@ -63,10 +64,11 @@ case class CreateTableAsSelectExec(
catalog: TableCatalog,
ident: Identifier,
partitioning: Seq[Transform],
plan: LogicalPlan,
query: SparkPlan,
properties: Map[String, String],
writeOptions: CaseInsensitiveStringMap,
ifNotExists: Boolean) extends V2TableWriteExec {
ifNotExists: Boolean) extends SupportsV1Write {

import org.apache.spark.sql.catalog.v2.CatalogV2Implicits.IdentifierHelper

Expand All @@ -83,12 +85,17 @@ case class CreateTableAsSelectExec(
catalog.createTable(
ident, query.schema, partitioning.toArray, properties.asJava) match {
case table: SupportsWrite =>
val batchWrite = table.newWriteBuilder(writeOptions)
val writer = table.newWriteBuilder(writeOptions)
.withInputDataSchema(query.schema)
.withQueryId(UUID.randomUUID().toString)
.buildForBatch()

doWrite(batchWrite)
writer match {
case v1: V1WriteBuilder =>
val mode = if (ifNotExists) SaveMode.Ignore else SaveMode.ErrorIfExists

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The table was just created above, so both of these modes are incorrect. This should be SaveMode.Append because the table already exists.

writeWithV1(v1.buildForV1Write(), mode, writeOptions)
case v2 =>
doWrite(v2.buildForBatch())
}

case _ =>
// table does not support writes
Expand All @@ -114,6 +121,7 @@ case class AtomicCreateTableAsSelectExec(
catalog: StagingTableCatalog,
ident: Identifier,
partitioning: Seq[Transform],
plan: LogicalPlan,
query: SparkPlan,
properties: Map[String, String],
writeOptions: CaseInsensitiveStringMap,
Expand All @@ -129,7 +137,8 @@ case class AtomicCreateTableAsSelectExec(
}
val stagedTable = catalog.stageCreate(
ident, query.schema, partitioning.toArray, properties.asJava)
writeToStagedTable(stagedTable, writeOptions, ident)
val mode = if (ifNotExists) SaveMode.Ignore else SaveMode.ErrorIfExists

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same problem here. I think mode should always be Append because that's the only one with reliable behavior that matches v2.

writeToStagedTable(stagedTable, writeOptions, ident, mode)
}
}

Expand All @@ -147,10 +156,11 @@ case class ReplaceTableAsSelectExec(
catalog: TableCatalog,
ident: Identifier,
partitioning: Seq[Transform],
plan: LogicalPlan,
query: SparkPlan,
properties: Map[String, String],
writeOptions: CaseInsensitiveStringMap,
orCreate: Boolean) extends AtomicTableWriteExec {
orCreate: Boolean) extends SupportsV1Write {

import org.apache.spark.sql.catalog.v2.CatalogV2Implicits.IdentifierHelper

Expand All @@ -173,12 +183,16 @@ case class ReplaceTableAsSelectExec(
Utils.tryWithSafeFinallyAndFailureCallbacks({
createdTable match {
case table: SupportsWrite =>
val batchWrite = table.newWriteBuilder(writeOptions)
val writer = table.newWriteBuilder(writeOptions)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't a writer, it's a builder.

.withInputDataSchema(query.schema)
.withQueryId(UUID.randomUUID().toString)
.buildForBatch()

doWrite(batchWrite)
writer match {
case v1: V1WriteBuilder =>
writeWithV1(v1.buildForV1Write(), SaveMode.Overwrite, writeOptions)
case v2 =>
doWrite(v2.buildForBatch())
}

case _ =>
// table does not support writes
Expand Down Expand Up @@ -207,6 +221,7 @@ case class AtomicReplaceTableAsSelectExec(
catalog: StagingTableCatalog,
ident: Identifier,
partitioning: Seq[Transform],
plan: LogicalPlan,
query: SparkPlan,
properties: Map[String, String],
writeOptions: CaseInsensitiveStringMap,
Expand All @@ -227,7 +242,7 @@ case class AtomicReplaceTableAsSelectExec(
} else {
throw new CannotReplaceMissingTableException(ident)
}
writeToStagedTable(staged, writeOptions, ident)
writeToStagedTable(staged, writeOptions, ident, SaveMode.Overwrite)
}
}

Expand All @@ -239,11 +254,16 @@ case class AtomicReplaceTableAsSelectExec(
case class AppendDataExec(
table: SupportsWrite,
writeOptions: CaseInsensitiveStringMap,
query: SparkPlan) extends V2TableWriteExec with BatchWriteHelper {
plan: LogicalPlan,
query: SparkPlan) extends SupportsV1Write with BatchWriteHelper {

override protected def doExecute(): RDD[InternalRow] = {
val batchWrite = newWriteBuilder().buildForBatch()
doWrite(batchWrite)
newWriteBuilder() match {
case v1: V1WriteBuilder =>
writeWithV1(v1.buildForV1Write(), SaveMode.Append, writeOptions)
case v2 =>
doWrite(v2.buildForBatch())
}
}
}

Expand All @@ -261,25 +281,26 @@ case class OverwriteByExpressionExec(
table: SupportsWrite,
deleteWhere: Array[Filter],
writeOptions: CaseInsensitiveStringMap,
query: SparkPlan) extends V2TableWriteExec with BatchWriteHelper {
plan: LogicalPlan,
query: SparkPlan) extends SupportsV1Write with BatchWriteHelper {

private def isTruncate(filters: Array[Filter]): Boolean = {
filters.length == 1 && filters(0).isInstanceOf[AlwaysTrue]
}

override protected def doExecute(): RDD[InternalRow] = {
val batchWrite = newWriteBuilder() match {
newWriteBuilder() match {
case v1: V1WriteBuilder if isTruncate(deleteWhere) =>
writeWithV1(v1.buildForV1Write(), SaveMode.Overwrite, writeOptions)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overwrite is ambiguous and doesn't specify whether the table data should be truncated, replaced dynamically by partition, etc. It isn't possible for v1 sources to guarantee the right behavior -- deleting data that matches deleteWhere -- so v1 fallback should not be supported here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to just do this but only if "deleteWhere") is empty?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. If you pass SaveMode.Overwrite into a v1 implementation, the behavior is undefined. So we shouldn't ever pass this.

I was talking to @brkyvz directly and we think that we can use SupportsDelete to make this possible. If a table supports deleting by filter, then we can run that first and then run the insert. But that should be done in a follow-up PR.

case builder: SupportsTruncate if isTruncate(deleteWhere) =>
builder.truncate().buildForBatch()
doWrite(builder.truncate().buildForBatch())

case builder: SupportsOverwrite =>
builder.overwrite(deleteWhere).buildForBatch()
doWrite(builder.overwrite(deleteWhere).buildForBatch())

case _ =>
throw new SparkException(s"Table does not support overwrite by expression: $table")
}

doWrite(batchWrite)
}
}

Expand Down Expand Up @@ -463,24 +484,30 @@ object DataWritingSparkTask extends Logging {
}
}

private[v2] trait AtomicTableWriteExec extends V2TableWriteExec {
private[v2] trait AtomicTableWriteExec extends SupportsV1Write {
import org.apache.spark.sql.catalog.v2.CatalogV2Implicits.IdentifierHelper

protected def writeToStagedTable(
stagedTable: StagedTable,
writeOptions: CaseInsensitiveStringMap,
ident: Identifier): RDD[InternalRow] = {
ident: Identifier,
mode: SaveMode): RDD[InternalRow] = {
Utils.tryWithSafeFinallyAndFailureCallbacks({
stagedTable match {
case table: SupportsWrite =>
val batchWrite = table.newWriteBuilder(writeOptions)
val writer = table.newWriteBuilder(writeOptions)
.withInputDataSchema(query.schema)
.withQueryId(UUID.randomUUID().toString)
.buildForBatch()

val writtenRows = doWrite(batchWrite)
val writtenRows = writer match {
case v1: V1WriteBuilder =>
writeWithV1(v1.buildForV1Write(), SaveMode.Overwrite, writeOptions)
case v2 =>
doWrite(v2.buildForBatch())
}
stagedTable.commitStagedChanges()
writtenRows

case _ =>
// Table does not support writes - staged changes are also rolled back below.
throw new SparkException(
Expand All @@ -501,3 +528,19 @@ private[v2] case class DataWritingSparkTaskResult(
* Sink progress information collected after commit.
*/
private[sql] case class StreamWriterCommitProgress(numOutputRows: Long)

/**
* A trait that allows Tables that use V1 Writer interfaces to write data.
*/
sealed trait SupportsV1Write extends V2TableWriteExec {
def plan: LogicalPlan

protected def writeWithV1(
relation: CreatableRelationProvider,
mode: SaveMode,
options: CaseInsensitiveStringMap): RDD[InternalRow] = {
relation.createRelation(
sqlContext, mode, options.asScala.toMap, Dataset.ofRows(sqlContext.sparkSession, plan))

@rdblue rdblue Aug 5, 2019

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should use the original options map that preserves the case that was passed in.

sparkContext.emptyRDD

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might be missing something here, but why does this return an RDD and why is it empty?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok so I see this is used in Atomic Table Writes, that seems a bit wrong to me, shouldn't we just not support the atomic table writes with V1 Fallback? Seems like we are violating the contract by returning empty regardless of what happens.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the contract? All data write commands have returned an empty result since the beginning of time, e.g. look at SaveIntoDataSourceCommand, V2TableWriteExec, InsertIntoDataSourceCommand.

@RussellSpitzer RussellSpitzer Aug 7, 2019

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

 val writtenRows = writer match {
            case v1: V1WriteBuilder =>
              writeWithV1(v1.buildForV1Write(), writeOptions)
            case v2 =>
              doWrite(v2.buildForBatch())
          }

If this is always empty why do we save it as writtenRows here? This is just to hold a reference to the empty result set?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah. It's pretty much dead code. I think if we decide to change what to return later, it's easier to change 1-2 places vs 'n' different operators.

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.spark.sql.sources.v2.writer

import org.apache.spark.annotation.{Experimental, Unstable}
import org.apache.spark.sql.sources.CreatableRelationProvider

/**
* A trait that should be implemented by V1 DataSources that would like to leverage the DataSource
* V2 write code paths.
*
* @since 3.0.0
*/
@Experimental
@Unstable
trait V1WriteBuilder extends WriteBuilder {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since it's a mixin trait, how about naming it SupportsV1Fallback?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, all of the other mixins and their functions return a WriteBuilder after their supported operation, whereas this ends the chain. I don't have too strong opinions on this. (I'm also considering, whether this should also finalize unsupported operations for the V2 writes, e.g. final buildBatchWrite() => Unsupported)


/**
* Creates a [[CreatableRelationProvider]] that allows saving a DataFrame to a
* a destination (using data source-specific parameters).
*
* The relation will receive a string to string map of options that will be case sensitive,
* therefore the implementation of the data source should be able to handle case insensitive
* option checking.
*
* @since 3.0.0
*/
def buildForV1Write(): CreatableRelationProvider = {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not add a path for InsertableRelation?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

insert semantics are weird. It doesn't support the passing in of options as well.
CreatableRelationProvider is more flexible. I also did a quick spot check of:
https://spark-packages.org/?q=tags%3A%22Data%20Sources%22

All sources that I checked support CreatableRelationProvider, but some don't support InsertableRelation

throw new UnsupportedOperationException(getClass.getName + " does not support batch write")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to throw an exception by default? This is a mixin trait. If users mix it in, they must provide the implementation.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, not needed.

}
}