You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/10/23 14:33:30 UTC

[GitHub] [spark] maropu commented on a change in pull request #26205: [SPARK-29545][SQL] Add support for bit_xor aggregate function

maropu commented on a change in pull request #26205: [SPARK-29545][SQL] Add support for bit_xor aggregate function
URL: https://github.com/apache/spark/pull/26205#discussion_r338086240
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/bitwiseAggregates.scala
 ##########
 @@ -97,3 +97,42 @@ case class BitOrAgg(child: Expression) extends DeclarativeAggregate with Expects
 
   override lazy val evaluateExpression: AttributeReference = bitOr
 }
+
+@ExpressionDescription(
+  usage = "_FUNC_(expr) - Returns the bitwise XOR of all non-null input values, or null if none.",
+  examples = """
+    Examples:
+      > SELECT _FUNC_(col) FROM VALUES (3), (5) AS tab(col);
+       6
+  """,
+  since = "3.0.0")
+case class BitXorAgg(child: Expression) extends DeclarativeAggregate with ExpectsInputTypes {
 
 Review comment:
   `BitAndAgg`, `BitOrAgg`, and `BitXorAgg` has the similar logic, so can we share it by using a new trait (e.g., BitwiseOpLike)?

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org