Github user davies commented on a diff in the pull request:

    https://github.com/apache/spark/pull/6982#discussion_r33536380
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/ExtractValue.scala
 ---
    @@ -209,4 +257,16 @@ case class GetMapValue(child: Expression, ordinal: 
Expression)
         val baseValue = value.asInstanceOf[Map[Any, _]]
         baseValue.get(ordinal).orNull
       }
    +
    +  override def genCode(ctx: CodeGenContext, ev: GeneratedExpressionCode): 
String = {
    +    nullSafeCodeGen(ctx, ev, (result, eval1, eval2) => {
    +      s"""
    +        if ($eval1.contains($eval2)) {
    +          $result = (${ctx.boxedType(dataType)})$eval1.apply($eval2);
    +        } else {
    +          ${ev.isNull} = true;
    --- End diff --
    
    We can leave it as it is now, may change to use java.util.HashMap in 
future. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to