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

    https://github.com/apache/spark/pull/3247#discussion_r27716819
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/Row.scala ---
    @@ -305,6 +305,49 @@ trait Row extends Serializable {
        */
       def getAs[T](i: Int): T = apply(i).asInstanceOf[T]
     
    +  /*       TODO make the syntactic sugar it as API?     */
    +  @inline
    +  final def apply(bound: BoundReference): Any = apply(bound.ordinal)
    +  @inline
    +  final def isNullAt(bound: BoundReference): Boolean = 
isNullAt(bound.ordinal)
    +  @inline
    +  final def getInt(bound: BoundReference): Int = getInt(bound.ordinal)
    +  @inline
    +  final def getLong(bound: BoundReference): Long = getLong(bound.ordinal)
    +  @inline
    +  final def getDouble(bound: BoundReference): Double = 
getDouble(bound.ordinal)
    +  @inline
    +  final def getBoolean(bound: BoundReference): Boolean = 
getBoolean(bound.ordinal)
    +  @inline
    +  final def getShort(bound: BoundReference): Short = 
getShort(bound.ordinal)
    +  @inline
    +  final def getByte(bound: BoundReference): Byte = getByte(bound.ordinal)
    +  @inline
    +  final def getFloat(bound: BoundReference): Float = 
getFloat(bound.ordinal)
    +  @inline
    +  final def getString(bound: BoundReference): String = 
getString(bound.ordinal)
    +  @inline
    +  final def getAs[T](bound: BoundReference): T = getAs[T](bound.ordinal)
    +  @inline
    +  final def getDecimal(bound: BoundReference): java.math.BigDecimal = 
getDecimal(bound.ordinal)
    +  @inline
    +  final def getDate(bound: BoundReference): java.sql.Date = 
getDate(bound.ordinal)
    +  @inline
    +  final def getSeq[T](bound: BoundReference): Seq[T] = 
getSeq(bound.ordinal)
    +  @inline
    +  final def getList[T](bound: BoundReference): java.util.List[T] = 
getList(bound.ordinal)
    +  @inline
    +  final def getMap[K, V](bound: BoundReference): scala.collection.Map[K, 
V] = {
    +    getMap(bound.ordinal)
    +  }
    +  @inline
    +  final def getJavaMap[K, V](bound: BoundReference): java.util.Map[K, V] = 
{
    +    getJavaMap(bound.ordinal)
    +  }
    +  @inline
    +  final def getStruct(bound: BoundReference): Row = 
getStruct(bound.ordinal)
    +  /*                  end of  the syntactic sugar it as API                
             */
    +
    --- End diff --
    
    This changes must be needed for this patch?
    The interfaces of `Row` are related to all the other operator.
    I think that if necessary, you make a PR first to add these interfaces in 
`Row`.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to