Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.9.0, 1.11.0
-
None
-
None
Description
The following query can be handled by Drill
SELECT b.marital_status, (SELECT SUM(position_id) FROM cp.`employee.json` a WHERE a.marital_status = b.marital_status ) AS max_a FROM cp.`employee.json` b
But if I add an alias to the aggregate fuction
SELECT b.marital_status, (SELECT SUM(position_id) MY_ALIAS FROM cp.`employee.json` a WHERE a.marital_status = b.marital_status ) AS max_a FROM cp.`employee.json` b
Drill starts complaining that it can't handle non-scalar subqueries
org.apache.drill.common.exceptions.UserRemoteException: UNSUPPORTED_OPERATION ERROR: Non-scalar sub-query used in an expression See Apache Drill JIRA: DRILL-1937