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 2021/01/31 07:42:12 UTC

[GitHub] [iceberg] dilipbiswal opened a new pull request #2187: [MINOR] Negate sourceRow and targetRow presence conditions for readability

dilipbiswal opened a new pull request #2187:
URL: https://github.com/apache/iceberg/pull/2187


   This is a minor PR that tries to address [comment](https://github.com/apache/iceberg/pull/2116#discussion_r560426572)


----------------------------------------------------------------
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] dilipbiswal commented on pull request #2187: [MINOR] Negate sourceRow and targetRow presence conditions for readability

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






----------------------------------------------------------------
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] dilipbiswal commented on a change in pull request #2187: [MINOR] Negate sourceRow and targetRow presence conditions for readability

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



##########
File path: spark3-extensions/src/main/scala/org/apache/spark/sql/catalyst/optimizer/RewriteMergeInto.scala
##########
@@ -78,8 +78,8 @@ case class RewriteMergeInto(spark: SparkSession) extends Rule[LogicalPlan] with
         val joinPlan = Join(source, targetTableScan, LeftAnti, Some(cond), JoinHint.NONE)
 
         val mergeParams = MergeIntoParams(
-          isSourceRowNotPresent = FALSE_LITERAL,

Review comment:
       Negating the flag reads better to me, personally. `rowPresentInSouce`  or `isRowPresentInSource` ?




----------------------------------------------------------------
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] dilipbiswal commented on pull request #2187: [MINOR] Negate sourceRow and targetRow presence conditions for readability

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


   cc @rdblue @aokolnychyi 


----------------------------------------------------------------
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 #2187: [MINOR] Negate sourceRow and targetRow presence conditions for readability

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


   


----------------------------------------------------------------
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 #2187: [MINOR] Negate sourceRow and targetRow presence conditions for readability

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


   


----------------------------------------------------------------
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 #2187: [MINOR] Negate sourceRow and targetRow presence conditions for readability

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


   LGTM


----------------------------------------------------------------
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] dilipbiswal commented on pull request #2187: [MINOR] Negate sourceRow and targetRow presence conditions for readability

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


   @aokolnychyi Could we get this in if you are okay ?


----------------------------------------------------------------
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 #2187: [MINOR] Negate sourceRow and targetRow presence conditions for readability

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



##########
File path: spark3-extensions/src/main/scala/org/apache/spark/sql/catalyst/optimizer/RewriteMergeInto.scala
##########
@@ -78,8 +78,8 @@ case class RewriteMergeInto(spark: SparkSession) extends Rule[LogicalPlan] with
         val joinPlan = Join(source, targetTableScan, LeftAnti, Some(cond), JoinHint.NONE)
 
         val mergeParams = MergeIntoParams(
-          isSourceRowNotPresent = FALSE_LITERAL,

Review comment:
       I agree with using positive flags instead of negative ones. Negatives are harder to reason about when using them because you may need to negate again: `!noMatchInSource` is harder than `isPresentInSource`




----------------------------------------------------------------
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 pull request #2187: [MINOR] Negate sourceRow and targetRow presence conditions for readability

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


   Looks good to me. Any other comments, @aokolnychyi?


----------------------------------------------------------------
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 pull request #2187: [MINOR] Negate sourceRow and targetRow presence conditions for readability

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


   I just talked with Anton and he said we're good to go.


----------------------------------------------------------------
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] dilipbiswal commented on pull request #2187: [MINOR] Negate sourceRow and targetRow presence conditions for readability

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


   Thank you very much @rdblue @aokolnychyi 


----------------------------------------------------------------
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 pull request #2187: [MINOR] Negate sourceRow and targetRow presence conditions for readability

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


   I just talked with Anton and he said we're good to go.


----------------------------------------------------------------
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 #2187: [MINOR] Negate sourceRow and targetRow presence conditions for readability

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


   LGTM


----------------------------------------------------------------
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 #2187: [MINOR] Negate sourceRow and targetRow presence conditions for readability

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



##########
File path: spark3-extensions/src/main/scala/org/apache/spark/sql/catalyst/optimizer/RewriteMergeInto.scala
##########
@@ -78,8 +78,8 @@ case class RewriteMergeInto(spark: SparkSession) extends Rule[LogicalPlan] with
         val joinPlan = Join(source, targetTableScan, LeftAnti, Some(cond), JoinHint.NONE)
 
         val mergeParams = MergeIntoParams(
-          isSourceRowNotPresent = FALSE_LITERAL,

Review comment:
       Will it be easier to reason about this logic in terms of `noMatchInSourceRelation`/`noMatchInTargetRelation`?




----------------------------------------------------------------
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