[
https://issues.apache.org/jira/browse/DRILL-2185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14312443#comment-14312443
]
Jason Altekruse commented on DRILL-2185:
----------------------------------------
While flatten is materialized into an operator, it is treated as a function for
most of the planning process. We can certainly document that * is specifically
not supported by flatten, but I have no idea what user would expect this to do
something meaningful. It seems in the same vain as aggregating over *, or
trying to call a scalar function on * which are both nonsensical in traditional
databases. There is an argument that we should support this eventually as input
to a complex function, when we merge the ideas of the top level schema map, and
a map stored in a particular field. However in regards to flatten, I don't
think we would ever support a repeated scalar or repeated map as the top level
schema element without a name, because it wouldn't be able to be referenced in
the query.
> flatten(*) should return a more appropriate error
> -------------------------------------------------
>
> Key: DRILL-2185
> URL: https://issues.apache.org/jira/browse/DRILL-2185
> Project: Apache Drill
> Issue Type: Bug
> Components: Functions - Drill
> Reporter: Rahul Challapalli
> Assignee: Daniel Barclay (Drill/MapR)
> Priority: Minor
>
> git.commit.id.abbrev=c54bd6a
> The below query returns an obscure error
> {code}
> 0: jdbc:drill:schema=dfs> select flatten(*) from `data1.json`;
> Query failed: AssertionError: Internal error: invariant violated: conversion
> result not null
> {code}
> We should mention that it is an in-appropriate use of the flatten operator
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)