andygrove commented on code in PR #2992:
URL: https://github.com/apache/datafusion-comet/pull/2992#discussion_r2658172028
##########
spark/src/main/scala/org/apache/spark/sql/comet/execution/shuffle/CometShuffleExchangeExec.scala:
##########
@@ -403,23 +403,39 @@ object CometShuffleExchangeExec
*
* Comet columnar shuffle used native code to convert Spark unsafe rows to
Arrow batches, see
* shuffle/row.rs
+ *
+ * Returns None if supported, or Some(reason) if not supported.
*/
- def supportedSerializableDataType(dt: DataType): Boolean = dt match {
+ def supportedSerializableDataType(dt: DataType): Option[String] = dt match
{
case _: BooleanType | _: ByteType | _: ShortType | _: IntegerType | _:
LongType |
_: FloatType | _: DoubleType | _: StringType | _: BinaryType | _:
TimestampType |
_: TimestampNTZType | _: DecimalType | _: DateType =>
- true
+ None
case StructType(fields) =>
- fields.nonEmpty && fields.forall(f =>
supportedSerializableDataType(f.dataType)) &&
- // Java Arrow stream reader cannot work on duplicate field name
- fields.map(f => f.name).distinct.length == fields.length &&
- fields.nonEmpty
+ if (!COMET_COLUMNAR_SHUFFLE_COMPLEX_TYPES_ENABLED.get(s.conf)) {
+ Some(s"${COMET_COLUMNAR_SHUFFLE_COMPLEX_TYPES_ENABLED.key} is not
enabled")
Review Comment:
👍
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]