You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2020/11/20 21:48:17 UTC

[GitHub] [iceberg] aokolnychyi opened a new pull request #1799: Spark: Add connector APIs for DELETE/UPDATE/MERGE

aokolnychyi opened a new pull request #1799:
URL: https://github.com/apache/iceberg/pull/1799


   This PR adds APIs to support DELETE/UPDATE/MERGE operations in Spark.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] aokolnychyi commented on a change in pull request #1799: Spark: Add connector APIs for DELETE/UPDATE/MERGE

Posted by GitBox <gi...@apache.org>.
aokolnychyi commented on a change in pull request #1799:
URL: https://github.com/apache/iceberg/pull/1799#discussion_r528035380



##########
File path: spark3/src/main/java/org/apache/spark/sql/connector/iceberg/catalog/SupportsMerge.java
##########
@@ -0,0 +1,41 @@
+/*
+ * 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.connector.iceberg.catalog;
+
+import org.apache.spark.sql.connector.catalog.Table;
+import org.apache.spark.sql.connector.iceberg.write.MergeBuilder;
+import org.apache.spark.sql.connector.write.LogicalWriteInfo;
+
+/**
+ * A mix-in interface for Table to indicate that it supports row-level operations.

Review comment:
       I did not reference Spark classes in our Javadoc.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] aokolnychyi commented on a change in pull request #1799: Spark: Add connector APIs for DELETE/UPDATE/MERGE

Posted by GitBox <gi...@apache.org>.
aokolnychyi commented on a change in pull request #1799:
URL: https://github.com/apache/iceberg/pull/1799#discussion_r527989922



##########
File path: spark3/src/main/java/org/apache/spark/sql/connector/iceberg/catalog/ExtendedSupportsDelete.java
##########
@@ -0,0 +1,30 @@
+/*
+ * 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.connector.iceberg.catalog;
+
+import org.apache.spark.sql.connector.catalog.SupportsDelete;
+import org.apache.spark.sql.sources.Filter;
+
+// this should be part of SupportsDelete when merged upstream
+public interface ExtendedSupportsDelete extends SupportsDelete {

Review comment:
       I'll submit a PR next week anyway.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] aokolnychyi commented on a change in pull request #1799: Spark: Add connector APIs for DELETE/UPDATE/MERGE

Posted by GitBox <gi...@apache.org>.
aokolnychyi commented on a change in pull request #1799:
URL: https://github.com/apache/iceberg/pull/1799#discussion_r527989789



##########
File path: spark3/src/main/java/org/apache/spark/sql/connector/iceberg/catalog/ExtendedSupportsDelete.java
##########
@@ -0,0 +1,30 @@
+/*
+ * 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.connector.iceberg.catalog;
+
+import org.apache.spark.sql.connector.catalog.SupportsDelete;
+import org.apache.spark.sql.sources.Filter;
+
+// this should be part of SupportsDelete when merged upstream
+public interface ExtendedSupportsDelete extends SupportsDelete {

Review comment:
       Seems like Spark is about to freeze 3.1 from Monday so it is unfortunate we did not get that into Spark :( 

##########
File path: spark3/src/main/java/org/apache/spark/sql/connector/iceberg/catalog/ExtendedSupportsDelete.java
##########
@@ -0,0 +1,30 @@
+/*
+ * 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.connector.iceberg.catalog;
+
+import org.apache.spark.sql.connector.catalog.SupportsDelete;
+import org.apache.spark.sql.sources.Filter;
+
+// this should be part of SupportsDelete when merged upstream
+public interface ExtendedSupportsDelete extends SupportsDelete {

Review comment:
       Seems like Spark is about to freeze 3.1 from Monday so it is unfortunate we did not get this into Spark :( 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] rdblue commented on a change in pull request #1799: Spark: Add connector APIs for DELETE/UPDATE/MERGE

Posted by GitBox <gi...@apache.org>.
rdblue commented on a change in pull request #1799:
URL: https://github.com/apache/iceberg/pull/1799#discussion_r527999223



##########
File path: spark3/src/main/java/org/apache/spark/sql/connector/iceberg/catalog/ExtendedSupportsDelete.java
##########
@@ -0,0 +1,30 @@
+/*
+ * 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.connector.iceberg.catalog;
+
+import org.apache.spark.sql.connector.catalog.SupportsDelete;
+import org.apache.spark.sql.sources.Filter;
+
+// this should be part of SupportsDelete when merged upstream
+public interface ExtendedSupportsDelete extends SupportsDelete {

Review comment:
       We can get it in still. This is a small change.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] rdblue merged pull request #1799: Spark: Add connector APIs for DELETE/UPDATE/MERGE

Posted by GitBox <gi...@apache.org>.
rdblue merged pull request #1799:
URL: https://github.com/apache/iceberg/pull/1799


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] aokolnychyi commented on a change in pull request #1799: Spark: Add connector APIs for DELETE/UPDATE/MERGE

Posted by GitBox <gi...@apache.org>.
aokolnychyi commented on a change in pull request #1799:
URL: https://github.com/apache/iceberg/pull/1799#discussion_r528007515



##########
File path: spark3/src/main/java/org/apache/spark/sql/connector/iceberg/catalog/SupportsMerge.java
##########
@@ -0,0 +1,28 @@
+/*
+ * 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.connector.iceberg.catalog;
+
+import org.apache.spark.sql.connector.catalog.Table;
+import org.apache.spark.sql.connector.iceberg.write.MergeBuilder;
+import org.apache.spark.sql.connector.write.LogicalWriteInfo;
+
+public interface SupportsMerge extends Table {

Review comment:
       Yeah, let me spend some time to add docs to the existing classes too. I think we are relatively confident in the implementation now.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] aokolnychyi edited a comment on pull request #1799: Spark: Add connector APIs for DELETE/UPDATE/MERGE

Posted by GitBox <gi...@apache.org>.
aokolnychyi edited a comment on pull request #1799:
URL: https://github.com/apache/iceberg/pull/1799#issuecomment-731424902


   These interfaced are added to the iceberg module too to avoid future conflicts.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] aokolnychyi commented on a change in pull request #1799: Spark: Add connector APIs for DELETE/UPDATE/MERGE

Posted by GitBox <gi...@apache.org>.
aokolnychyi commented on a change in pull request #1799:
URL: https://github.com/apache/iceberg/pull/1799#discussion_r528035581



##########
File path: spark3/src/main/java/org/apache/spark/sql/connector/iceberg/catalog/SupportsMerge.java
##########
@@ -0,0 +1,28 @@
+/*
+ * 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.connector.iceberg.catalog;
+
+import org.apache.spark.sql.connector.catalog.Table;
+import org.apache.spark.sql.connector.iceberg.write.MergeBuilder;
+import org.apache.spark.sql.connector.write.LogicalWriteInfo;
+
+public interface SupportsMerge extends Table {

Review comment:
       I added some basic docs. Feel free to correct wording if it is not clear.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] rdblue commented on a change in pull request #1799: Spark: Add connector APIs for DELETE/UPDATE/MERGE

Posted by GitBox <gi...@apache.org>.
rdblue commented on a change in pull request #1799:
URL: https://github.com/apache/iceberg/pull/1799#discussion_r527999996



##########
File path: spark3/src/main/java/org/apache/spark/sql/connector/iceberg/catalog/SupportsMerge.java
##########
@@ -0,0 +1,28 @@
+/*
+ * 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.connector.iceberg.catalog;
+
+import org.apache.spark.sql.connector.catalog.Table;
+import org.apache.spark.sql.connector.iceberg.write.MergeBuilder;
+import org.apache.spark.sql.connector.write.LogicalWriteInfo;
+
+public interface SupportsMerge extends Table {

Review comment:
       Can we add Javadoc for all of these classes and methods? I think that would be helpful.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] rdblue commented on a change in pull request #1799: Spark: Add connector APIs for DELETE/UPDATE/MERGE

Posted by GitBox <gi...@apache.org>.
rdblue commented on a change in pull request #1799:
URL: https://github.com/apache/iceberg/pull/1799#discussion_r527999649



##########
File path: spark3/src/main/java/org/apache/spark/sql/connector/iceberg/catalog/ExtendedSupportsDelete.java
##########
@@ -0,0 +1,30 @@
+/*
+ * 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.connector.iceberg.catalog;
+
+import org.apache.spark.sql.connector.catalog.SupportsDelete;
+import org.apache.spark.sql.sources.Filter;
+
+// this should be part of SupportsDelete when merged upstream
+public interface ExtendedSupportsDelete extends SupportsDelete {

Review comment:
       And the freeze date under discussion was at least 1 December, so we have some time.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] aokolnychyi commented on pull request #1799: Spark: Add connector APIs for DELETE/UPDATE/MERGE

Posted by GitBox <gi...@apache.org>.
aokolnychyi commented on pull request #1799:
URL: https://github.com/apache/iceberg/pull/1799#issuecomment-731424902


   These interfaced are added to the iceberg module too.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org