Class

doric.syntax.DateColumns

DateColumnLikeSyntax

Related Doc: package DateColumns

Permalink

implicit class DateColumnLikeSyntax[T] extends AnyRef

Linear Supertypes
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. DateColumnLikeSyntax
  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 DateColumnLikeSyntax(column: DoricColumn[T])(implicit arg0: DateType[T], arg1: SparkType[T])

    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 DateColumnLikeSyntax[T] to any2stringadd[DateColumnLikeSyntax[T]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (DateColumnLikeSyntax[T], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from DateColumnLikeSyntax[T] to ArrowAssoc[DateColumnLikeSyntax[T]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. def <(other: DoricColumn[T]): BooleanColumn

    Permalink

  6. def <=(other: DoricColumn[T]): BooleanColumn

    Permalink

  7. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def >(other: DoricColumn[T]): BooleanColumn

    Permalink

  9. def >=(other: DoricColumn[T]): BooleanColumn

    Permalink

  10. def addDays(days: IntegerColumn): DateColumn

    Permalink

    Returns the date that is days days after date column

    Returns the date that is days days after date column

    days

    A column of the number of days to add to date column, can be negative to subtract days

    Note

    Timestamp columns will be truncated to Date column

  11. def addMonths(nMonths: IntegerColumn): DateColumn

    Permalink

    Adds to the Date or Timestamp column the number of months

    Adds to the Date or Timestamp column the number of months

    nMonths

    the number of months to add, can be negative to subtract.

    returns

    Date column after adding months

    Note

    Timestamp columns will be truncated to Date column

  12. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  14. def dayOfMonth: IntegerColumn

    Permalink

    Extracts the day of the month as an integer from a given date.

    Extracts the day of the month as an integer from a given date.

    See also

    org.apache.spark.sql.functions.dayofmonth

  15. def dayOfWeek: IntegerColumn

    Permalink

    Extracts the day of the week as an integer from a given date.

    Extracts the day of the week as an integer from a given date. Ranges from 1 for a Sunday through to 7 for a Saturday

    See also

    org.apache.spark.sql.functions.dayofweek

  16. def dayOfYear: IntegerColumn

    Permalink

    Extracts the day of the year as an integer from a given date.

    Extracts the day of the year as an integer from a given date.

    See also

    org.apache.spark.sql.functions.dayofyear

  17. def diff(dateCol: DoricColumn[T]): IntegerColumn

    Permalink

    Returns the number of days from date column to dateCol.

    Returns the number of days from date column to dateCol.

    dateCol

    A Date or Timestamp column

    See also

    org.apache.spark.sql.functions.datediff

  18. def endOfMonth: DateColumn

    Permalink

    Sets the moment to the last day of the same month.

    Sets the moment to the last day of the same month.

    See also

    org.apache.spark.sql.functions.last_day

  19. def ensuring(cond: (DateColumnLikeSyntax[T]) ⇒ Boolean, msg: ⇒ Any): DateColumnLikeSyntax[T]

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

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

    Permalink
    Implicit information
    This member is added by an implicit conversion from DateColumnLikeSyntax[T] to Ensuring[DateColumnLikeSyntax[T]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  22. def ensuring(cond: Boolean): DateColumnLikeSyntax[T]

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  25. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  26. def format(format: StringColumn): StringColumn

    Permalink

    Converts a date to a value of string in the format specified by the date format given by the second argument.

    Converts a date to a value of string in the format specified by the date format given by the second argument.

    format

    A pattern dd.MM.yyyy would return a string like 18.03.1993

    Exceptions thrown

    java.lang.IllegalArgumentException if malformed format

    Note

    Use specialized functions like 'year' whenever possible as they benefit from a specialized implementation.

    See also

    org.apache.spark.sql.functions.date_format

  27. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from DateColumnLikeSyntax[T] to StringFormat[DateColumnLikeSyntax[T]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  28. final def getClass(): Class[_]

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

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

    Permalink
    Definition Classes
    Any
  31. def lastDayOfMonth: DateColumn

    Permalink

    Returns the last day of the month which the given date belongs to.

    Returns the last day of the month which the given date belongs to. For example, input "2015-07-27" returns "2015-07-31" since July 31 is the last day of the month in July 2015.

    See also

    org.apache.spark.sql.functions.last_day

  32. def lit(implicit l: Location): LiteralDoricColumn[DateColumnLikeSyntax[T]]

    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 DateColumnLikeSyntax[T] to doric.LiteralOps[DateColumnLikeSyntax[T]] performed by method LiteralOps in doric.syntax.LiteralConversions. This conversion will take place only if an implicit value of type SparkType[DateColumnLikeSyntax[T]] is in scope and at the same time an implicit value of type LiteralSparkType[DateColumnLikeSyntax[T]] is in scope.
    Definition Classes
    LiteralOps
    Annotations
    @inline()
  33. def month: IntegerColumn

    Permalink

    Extracts the month as an integer from a given date.

    Extracts the month as an integer from a given date.

    See also

    org.apache.spark.sql.functions.month

  34. def monthsBetween(dateCol: DoricColumn[T], roundOff: BooleanColumn): DoubleColumn

    Permalink

    Returns number of months between dates dateCol and date column.

    Returns number of months between dates dateCol and date column.

    dateCol

    Date or Timestamp column

    roundOff

    If roundOff is set to true, the result is rounded off to 8 digits; it is not rounded otherwise.

    See also

    org.apache.spark.sql.functions.months_between

  35. def monthsBetween(dateCol: DoricColumn[T]): DoubleColumn

    Permalink

    Returns number of months between dates date column and dateCol.

    Returns number of months between dates date column and dateCol.

    A whole number is returned if both inputs have the same day of month or both are the last day of their respective months. Otherwise, the difference is calculated assuming 31 days per month.

    For example:

    dateCol

    Date or Timestamp column

    Example:
    1. Date("2017-11-14").monthsBetween(Date("2017-07-14"))                              // returns 4.0
      Date("2017-01-01").monthsBetween(Date("2017-01-10"))                              // returns 0.29032258
      Timestamp("2017-06-01 00:00:00").monthsBetween(Timestamp("2017-06-16 12:00:00"))  // returns -0.5
    See also

    org.apache.spark.sql.functions.months_between

  36. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  37. def nextDay(dayOfWeek: StringColumn): DateColumn

    Permalink

    Returns the first date which is later than the value of the date column that is on the specified day of the week.

    Returns the first date which is later than the value of the date column that is on the specified day of the week.

    dayOfWeek

    Case insensitive, and accepts: "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"

    Example:
    1. For example, Date("2015-07-27").nextDay("Sunday") returns Date("2015-08-02") because that is the first Sunday after 2015-07-27.

    To do

    scaladoc link (issue #135)

    Note

    Timestamp columns will be truncated to Date column

    See also

    org.apache.spark.sql.functions.next_day

  38. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  40. def quarter: IntegerColumn

    Permalink

    Extracts the quarter as an integer from a given date.

    Extracts the quarter as an integer from a given date.

    See also

    org.apache.spark.sql.functions.quarter

  41. def subDays(days: IntegerColumn): DateColumn

    Permalink

    Returns the date that is days days before date column

    Returns the date that is days days before date column

    days

    A column of the number of days to subtract from date column, can be negative to add days

    Note

    Timestamp columns will be truncated to Date column

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

    Permalink
    Definition Classes
    AnyRef
  43. def toInstant: InstantColumn

    Permalink

    Transform date to Instant

    Transform date to Instant

    See also

    org.apache.spark.sql.functions.to_timestamp

  44. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  45. def toTimestamp: TimestampColumn

    Permalink

    Transform date to timestamp

    Transform date to timestamp

    See also

    org.apache.spark.sql.functions.to_timestamp

  46. def truncate(format: StringColumn): DoricColumn[T]

    Permalink

    Returns date truncated to the unit specified by the format.

    Returns date truncated to the unit specified by the format.

    format

    • if date:
      • 'year', 'yyyy', 'yy' to truncate by year,
      • 'month', 'mon', 'mm' to truncate by month
      • Other options are: 'week', 'quarter'
    • if timestamp:
      • 'year', 'yyyy', 'yy' to truncate by year,
      • 'month', 'mon', 'mm' to truncate by month,
      • 'day', 'dd' to truncate by day,
      • Other options are: 'microsecond', 'millisecond', 'second', 'minute', 'hour', 'week', 'quarter'
    Example:
    1. For example, Timestamp("2018-11-19 12:01:19").trunc("year") returns Date("2018-01-01")

    Note

    Timestamp columns will be truncated to Date column

    See also

    org.apache.spark.sql.functions.date_trunc

    org.apache.spark.sql.functions.trunc

  47. def unixTimestamp: LongColumn

    Permalink

    Converts date/timestamp to Unix timestamp (in seconds), using the default timezone and the default locale.

    Converts date/timestamp to Unix timestamp (in seconds), using the default timezone and the default locale.

    returns

    A long

    See also

    org.apache.spark.sql.functions.unix_timestamp

  48. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  51. def weekOfYear: IntegerColumn

    Permalink

    Extracts the week number as an integer from a given date.

    Extracts the week number as an integer from a given date.

    A week is considered to start on a Monday and week 1 is the first week with more than 3 days, as defined by ISO 8601

    See also

    org.apache.spark.sql.functions.weekofyear

  52. def year: IntegerColumn

    Permalink

    Extracts the year as an integer from a given date.

    Extracts the year as an integer from a given date.

    See also

    org.apache.spark.sql.functions.year

  53. def [B](y: B): (DateColumnLikeSyntax[T], B)

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

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion LiteralOps from DateColumnLikeSyntax[T] to doric.LiteralOps[DateColumnLikeSyntax[T]]

Inherited by implicit conversion any2stringadd from DateColumnLikeSyntax[T] to any2stringadd[DateColumnLikeSyntax[T]]

Inherited by implicit conversion StringFormat from DateColumnLikeSyntax[T] to StringFormat[DateColumnLikeSyntax[T]]

Inherited by implicit conversion Ensuring from DateColumnLikeSyntax[T] to Ensuring[DateColumnLikeSyntax[T]]

Inherited by implicit conversion ArrowAssoc from DateColumnLikeSyntax[T] to ArrowAssoc[DateColumnLikeSyntax[T]]

Comparable Type

Date & Timestamp Type

Date Type

Ungrouped