spark-instrumented-optimizer/python/pyspark/sql
Reynold Xin 219a9043ef [SPARK-7321][SQL] Add Column expression for conditional statements (when/otherwise)
This builds on https://github.com/apache/spark/pull/5932 and should close https://github.com/apache/spark/pull/5932 as well.

As an example:
```python
df.select(when(df['age'] == 2, 3).otherwise(4).alias("age")).collect()
```

Author: Reynold Xin <rxin@databricks.com>
Author: kaka1992 <kaka_1992@163.com>

Closes #6072 from rxin/when-expr and squashes the following commits:

8f49201 [Reynold Xin] Throw exception if otherwise is applied twice.
0455eda [Reynold Xin] Reset run-tests.
bfb9d9f [Reynold Xin] Updated documentation and test cases.
762f6a5 [Reynold Xin] Merge pull request #5932 from kaka1992/IFCASE
95724c6 [kaka1992] Update
8218d0a [kaka1992] Update
801009e [kaka1992] Update
76d6346 [kaka1992] [SPARK-7321][SQL] Add Column expression for conditional statements (if, case)

(cherry picked from commit 97dee313f2)
Signed-off-by: Reynold Xin <rxin@databricks.com>
2015-05-12 21:44:16 -07:00
..
__init__.py [SPARK-7321][SQL] Add Column expression for conditional statements (when/otherwise) 2015-05-12 21:44:16 -07:00
_types.py [SPARK-7462][SQL] Update documentation for retaining grouping columns in DataFrames. 2015-05-11 18:07:19 -07:00
context.py [SPARK-6949] [SQL] [PySpark] Support Date/Timestamp in Column expression 2015-04-21 00:08:18 -07:00
dataframe.py [SPARK-7321][SQL] Add Column expression for conditional statements (when/otherwise) 2015-05-12 21:44:16 -07:00
functions.py [SPARK-7321][SQL] Add Column expression for conditional statements (when/otherwise) 2015-05-12 21:44:16 -07:00
tests.py [SPARK-6876] [PySpark] [SQL] add DataFrame na.replace in pyspark 2015-05-12 10:23:57 -07:00