[
https://issues.apache.org/jira/browse/GRIFFIN-311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17002829#comment-17002829
]
Chitral Verma commented on GRIFFIN-311:
---------------------------------------
[~VAIOme] I believe the issue you're referring to is not an Apache Griffin
based issue but an Apache Spark based issue. the _toJson()_ triggers the
jsonizing of the rows which omits null observations on row level.
> keep null value columns optionally
> ----------------------------------
>
> Key: GRIFFIN-311
> URL: https://issues.apache.org/jira/browse/GRIFFIN-311
> Project: Griffin
> Issue Type: New Feature
> Reporter: XIAOYU YU
> Priority: Major
>
> Hi all,
> Our team are facing a confused issue that griffin's output could not keep
> the null value columns.
> Our spark version is 2.2. For the following table xxx.xxxx and rule:
> |name|age|date|
> |NULL|12|2018-11-11|
> |sizhe|NULL|2018-11-11|
> rule:
> {code:java}
> "rule" : "select name, age from xxx.xxxx",
> "out" : {"type" : "metric", "flatten" : "array"}
> "dsl.type" : "spark-sql", "out.dataframe.name" : "payloads"{code}
> Griffin result would be as follows, which ignore the null value and null line.
> {code:java}
> [{"age": 12}, {"name": "sizhe"}] {code}
> It would confuse some users, when they found some columns missed in result
> and the expected result for them should be:
> {code:java}
> [{"name": null, "age": 12}, {"name": "sizhe", "age": null}] {code}
>
> And for sql:
> {code:java}
> "rule" : "select name, age from xxx.xxxx where date = '2019-01-01'", {code}
> Griffin result would be []. But the expected result for them should be
> {code:java}
> [{"name": null, "age": null}]{code}
> , which contains a null line.
>
> Could griffin add a new feature to keep the null value columns optionally to
> make these users happy?
--
This message was sent by Atlassian Jira
(v8.3.4#803005)