Skip to content

Commit

Permalink
[SQL][API] ComputableColumn vs IncomputableColumn
Browse files Browse the repository at this point in the history
This patch changes Column from a concrete implementation to a trait, and provides two
concrete implementations: IncomputableColumn and ComputableColumn.
  • Loading branch information
rxin committed Feb 2, 2015
1 parent 1ca0a10 commit e6f00b8
Show file tree
Hide file tree
Showing 15 changed files with 807 additions and 346 deletions.
241 changes: 147 additions & 94 deletions sql/core/src/main/scala/org/apache/spark/sql/Column.scala

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.spark.sql

import scala.language.implicitConversions

import org.apache.spark.sql.catalyst.expressions.Expression
import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan


private[sql] class ComputableColumn protected[sql](
sqlContext: SQLContext,
protected[sql] val plan: LogicalPlan,
protected[sql] val expr: Expression)
extends DataFrameImpl(sqlContext, plan) with Column {

override def isComputable: Boolean = true
}
Loading

0 comments on commit e6f00b8

Please sign in to comment.