Class

doric.syntax.MapColumns

MapColumnOps

Related Doc: package MapColumns

Permalink

implicit class MapColumnOps[K, V] extends AnyRef

Extension methods for Map Columns

Linear Supertypes
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. MapColumnOps
  2. AnyRef
  3. Any
Implicitly
  1. by LiteralOps
  2. by any2stringadd
  3. by StringFormat
  4. by Ensuring
  5. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MapColumnOps(map: MapColumn[K, V])(implicit arg0: SparkType[K], arg1: SparkType[V])

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from MapColumnOps[K, V] to any2stringadd[MapColumnOps[K, V]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (MapColumnOps[K, V], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from MapColumnOps[K, V] to ArrowAssoc[MapColumnOps[K, V]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def elementAt(key: DoricColumn[K]): DoricColumn[V]

    Permalink

    Returns value for the given key in value.

    Returns value for the given key in value.

    See also

    org.apache.spark.sql.functions.element_at

  9. def ensuring(cond: (MapColumnOps[K, V]) ⇒ Boolean, msg: ⇒ Any): MapColumnOps[K, V]

    Permalink
    Implicit information
    This member is added by an implicit conversion from MapColumnOps[K, V] to Ensuring[MapColumnOps[K, V]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  10. def ensuring(cond: (MapColumnOps[K, V]) ⇒ Boolean): MapColumnOps[K, V]

    Permalink
    Implicit information
    This member is added by an implicit conversion from MapColumnOps[K, V] to Ensuring[MapColumnOps[K, V]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: Boolean, msg: ⇒ Any): MapColumnOps[K, V]

    Permalink
    Implicit information
    This member is added by an implicit conversion from MapColumnOps[K, V] to Ensuring[MapColumnOps[K, V]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: Boolean): MapColumnOps[K, V]

    Permalink
    Implicit information
    This member is added by an implicit conversion from MapColumnOps[K, V] to Ensuring[MapColumnOps[K, V]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  15. def explode: DoricColumn[Row]

    Permalink

    Creates a new row for each element in the given map column.

    Creates a new row for each element in the given map column.

    Example:
    1.    ORIGINAL             SPARK         DORIC
      +----------------+   +---+-----+     +------+
      |col             |   |key|value|     |col   |
      +----------------+   +---+-----+     +------+
      |[a -> b, c -> d]|   |a  |b    |     |{a, b}|
      |[]              |   |c  |d    |     |{c, d}|
      |null            |   +---+-----+     +------+
      +----------------+
    Note

    WARNING: Unlike spark, doric returns a struct

    See also

    org.apache.spark.sql.functions.explode

  16. def explodeOuter: DoricColumn[Row]

    Permalink

    Creates a new row for each element in the given map column.

    Creates a new row for each element in the given map column.

    Example:
    1.       ORIGINAL               SPARK            DORIC
      +---+----------------+   +---+----+-----+  +---+------+
      |ix |col             |   |ix |key |value|  |ix |col   |
      +---+----------------+   +---+----+-----+  +---+------+
      |1  |{a -> b, c -> d}|   |1  |a   |b    |  |1  |{a, b}|
      |2  |{}              |   |1  |c   |d    |  |1  |{c, d}|
      |3  |null            |   |2  |null|null |  |2  |null  |
      +---+----------------+   |3  |null|null |  |3  |null  |
                               +---+----+-----+  +---+------+
    Note

    WARNING: Unlike spark, doric returns a struct

    ,

    Unlike explode, if the array is null or empty then null is produced.

    See also

    org.apache.spark.sql.functions.explode_outer

  17. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from MapColumnOps[K, V] to StringFormat[MapColumnOps[K, V]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  19. def get(key: DoricColumn[K]): DoricColumn[V]

    Permalink

    Returns the value if exist of the key

    Returns the value if exist of the key

    key

    the required key

    returns

    a DoricColumn of the type of value, can be null if the key doesn't exist.

  20. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  21. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  22. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  23. def keys: DoricColumn[Array[K]]

    Permalink

    Returns an unordered array containing the keys of the map.

    Returns an unordered array containing the keys of the map.

    returns

    the DoricColumn of the Array of keys

    See also

    org.apache.spark.sql.functions.map_keys

  24. def lit(implicit l: Location): LiteralDoricColumn[MapColumnOps[K, V]]

    Permalink

    Transforms the original value to a literal.

    Transforms the original value to a literal.

    returns

    a literal with the same type.

    Implicit information
    This member is added by an implicit conversion from MapColumnOps[K, V] to doric.LiteralOps[MapColumnOps[K, V]] performed by method LiteralOps in doric.syntax.LiteralConversions. This conversion will take place only if an implicit value of type SparkType[MapColumnOps[K, V]] is in scope and at the same time an implicit value of type LiteralSparkType[MapColumnOps[K, V]] is in scope.
    Definition Classes
    LiteralOps
    Annotations
    @inline()
  25. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  26. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  27. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  28. def posExplode: DoricColumn[Row]

    Permalink

    Creates a new row for each element with position in the given map column.

    Creates a new row for each element with position in the given map column.

    Example:
    1.    ORIGINAL               SPARK             DORIC
      +----------------+   +---+---+-----+     +---------+
      |col             |   |pos|key|value|     |col      |
      +----------------+   +---+---+-----+     +---------+
      |[a -> b, c -> d]|   |1  |a  |b    |     |{1, a, b}|
      |[]              |   |2  |c  |d    |     |{2, c, d}|
      |null            |   +---+---+-----+     +---------+
      +----------------+
    Note

    WARNING: Unlike spark, doric returns a struct

    ,

    Uses the default column name pos for position, and key and value for elements in the map.

    See also

    org.apache.spark.sql.functions.posexplode

  29. def posExplodeOuter: RowColumn

    Permalink

    Creates a new row for each element with position in the given map column.

    Creates a new row for each element with position in the given map column. Unlike posexplode, if the map is null or empty then the row (null, null) is produced.

    Example:
    1.    ORIGINAL               SPARK             DORIC
      +----------------+   +---+----+-----+    +---------+
      |col             |   |pos|key |value|    |col      |
      +----------------+   +---+----+-----+    +---------+
      |[a -> b, c -> d]|   |1  |a   |b    |    |{1, a, b}|
      |[]              |   |2  |c   |d    |    |{2, c, d}|
      |null            |   |2  |null|null |    |null     |
      +----------------+   |3  |null|null |    |null     |
                           +---+----+-----+    +---+-----+
    Note

    WARNING: Unlike spark, doric returns a struct

    ,

    Uses the default column name pos for position, and key and value for elements in the map.

    See also

    org.apache.spark.sql.functions.posexplode_outer

  30. def size: IntegerColumn

    Permalink

    Returns length of map.

    Returns length of map.

    The function returns null for null input if spark.sql.legacy.sizeOfNull is set to false or spark.sql.ansi.enabled is set to true. Otherwise, the function returns -1 for null input. With the default settings, the function returns -1 for null input.

    See also

    org.apache.spark.sql.functions.size

  31. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  32. def toArray: DoricColumn[Array[Row]]

    Permalink

    DORIC EXCLUSIVE! Map to array conversion

  33. def toJson(options: Map[String, String] = Map.empty): StringColumn

    Permalink

    Converts a column containing a StructType into a JSON string with the specified schema.

    Converts a column containing a StructType into a JSON string with the specified schema.

    Exceptions thrown

    java.lang.IllegalArgumentException in the case of an unsupported type.

    To do

    scaladoc link (issue #135)

    See also

    org.apache.spark.sql.functions.to_json(e:org\.apache\.spark\.sql\.Column,options:scala\.collection\.immutable\.Map\[java\.lang\.String,java\.lang\.String\]):* org.apache.spark.sql.functions.to_csv

  34. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  35. def values: DoricColumn[Array[V]]

    Permalink

    Returns an unordered array containing the values of the map.

    Returns an unordered array containing the values of the map.

    returns

    the DoricColumn of the Array of values

    See also

    org.apache.spark.sql.functions.map_values

  36. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. def [B](y: B): (MapColumnOps[K, V], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from MapColumnOps[K, V] to ArrowAssoc[MapColumnOps[K, V]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion LiteralOps from MapColumnOps[K, V] to doric.LiteralOps[MapColumnOps[K, V]]

Inherited by implicit conversion any2stringadd from MapColumnOps[K, V] to any2stringadd[MapColumnOps[K, V]]

Inherited by implicit conversion StringFormat from MapColumnOps[K, V] to StringFormat[MapColumnOps[K, V]]

Inherited by implicit conversion Ensuring from MapColumnOps[K, V] to Ensuring[MapColumnOps[K, V]]

Inherited by implicit conversion ArrowAssoc from MapColumnOps[K, V] to ArrowAssoc[MapColumnOps[K, V]]

Map Type

Ungrouped