You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "benj (JIRA)" <ji...@apache.org> on 2019/03/20 11:58:00 UTC
[jira] [Commented] (DRILL-4232) Support for EXCEPT set operator
[ https://issues.apache.org/jira/browse/DRILL-4232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16797093#comment-16797093 ]
benj commented on DRILL-4232:
-----------------------------
Until the feature is implemented, there are queries to achieve the same result.
file1.csvh:
{code:java}
a
1
1
2
3
{code}
file2.csvh:
{code:java}
a
4
2
4
1
{code}
Expected if EXCEPT was implemented:
{code:java}
SELECT a FROM ....`file2.csvh`
EXCEPT ALL
SELECT a FROM ....`file1.csvh`
=>
4
4
{code}
Currently without EXCEPT:
{code:java}
SELECT a FROM
(
SELECT a, min(idfile) OVER (PARTITION BY a) AS min_idfile FROM
(
SELECT a, 1 idfile FROM ....`file2.csvh`
UNION ALL
SELECT a, 0 iddfile FROM ....`file1.csvh`
)
) WHERE min_idfile = 1
{code}
Hoping that this can help until we can use the standard SQL syntax.
> Support for EXCEPT set operator
> -------------------------------
>
> Key: DRILL-4232
> URL: https://issues.apache.org/jira/browse/DRILL-4232
> Project: Apache Drill
> Issue Type: New Feature
> Components: Query Planning & Optimization
> Reporter: Victoria Markman
> Priority: Major
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)