You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Jay Danielsen (JIRA)" <ji...@apache.org> on 2017/03/15 19:25:41 UTC
[jira] [Created] (SPARK-19963) create view from select Fails when
nullif() is used
Jay Danielsen created SPARK-19963:
-------------------------------------
Summary: create view from select Fails when nullif() is used
Key: SPARK-19963
URL: https://issues.apache.org/jira/browse/SPARK-19963
Project: Spark
Issue Type: Bug
Components: SQL
Affects Versions: 2.1.0
Reporter: Jay Danielsen
Priority: Minor
Test Case : Any valid query using nullif.
SELECT nullif(mycol,0) from mytable;
Create view FAILS when nullif used in select.
CREATE VIEW my_view as
SELECT nullif(mycol,0) from mytable;
Error: java.lang.RuntimeException: Failed to analyze the canonicalized SQL: ...
I can refactor with CASE statement and create view successfully.
CREATE VIEW my_view as
SELECT CASE WHEN mycol = 0 THEN NULL ELSE mycol END mycol from mytable;
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org