dongjoon-hyun commented on issue #24223: [SPARK-27278][SQL] Optimize 
GetMapValue when the map is a foldable and the key is not
URL: https://github.com/apache/spark/pull/24223#issuecomment-479564873
 
 
   Hi, @cloud-fan and @gatorsmile . 
   Although this is 7 line of code, I understand your concerns about  `increase 
the code size` and `not worth the complexity`. Shall I revert this?
   ```scala
   case GetMapValue(Literal(map: MapData, MapType(kt, vt, _)), key) if 
!key.foldable =>
     val elems = new mutable.ListBuffer[Literal]
     map.foreach(kt, vt, (key, value) => {
       elems.append(Literal(key, kt))
       elems.append(Literal(value, vt))
     })
     CaseKeyWhen(key, elems.result())
   ```

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to