/** * A column that will be computed based on the data in a `DataFrame`. * * A new column can be constructed based on the input columns present in a DataFrame: * * {{{ * df("columnName") // On a specific `df` DataFrame. * col("columnName") // A generic column not yet associated with a DataFrame. * col("columnName.field") // Extracting a struct field * col("`a.column.with.dots`") // Escape `.` in column names. * $"columnName" // Scala short hand for a named column. * }}} * * [[Column]] objects can be composed to form complex expressions: * * {{{ * $"a" + 1 * $"a" === $"b" * }}} * * @note The internal Catalyst expression can be accessed via [[expr]], but this method is for * debugging purposes only and can change in any future Spark releases. * * @groupname java_expr_ops Java-specific expression operators * @groupname expr_ops Expression operators * @groupname df_ops DataFrame functions * @groupname Ungrouped Support functions for DataFrames * * @since 1.3.0 */ @InterfaceStability.Stable classColumn(val expr: Expression) extendsLogging{
defthis(name: String) = this(name match { case"*" => UnresolvedStar(None) case _ if name.endsWith(".*") => val parts = UnresolvedAttribute.parseAttributeName(name.substring(0, name.length - 2)) UnresolvedStar(Some(parts)) case _ => UnresolvedAttribute.quotedString(name) })