comphead opened a new issue, #4684:
URL: https://github.com/apache/datafusion-comet/issues/4684
> in Apache Spark, the ElementAt supports Map, and Comet gates for Array
only, we should support Map
>
> ```
> override def inputTypes: Seq[AbstractDataType] = {
> (left.dataType, right.dataType) match {
> case (arr: ArrayType, e2: IntegralType) if (e2 != LongType) =>
> Seq(arr, IntegerType)
> case (MapType(keyType, valueType, hasNull), e2) =>
> TypeCoercion.findTightestCommonType(keyType, e2) match {
> case Some(dt) => Seq(MapType(dt, valueType, hasNull), dt)
> case _ => Seq.empty
> }
> case (l, r) => Seq.empty
>
> }
> }
> ```
_Originally posted by @comphead in
[#4677](https://github.com/apache/datafusion-comet/pull/4677/changes#r3436913514)_
--
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]