[ 
https://issues.apache.org/jira/browse/DRILL-4900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15514406#comment-15514406
 ] 

Robert DeVito commented on DRILL-4900:
--------------------------------------

Thanks for following up quickly.
I’m afraid we didn’t explain the issue as clearly as we could have.
There WHERE clauses are not thrown away per-se. Our issue is that Drill is 
sending the query to a database without the WHERE clause, pulling all of the 
data for that table, and applying a filter on the data that is returned.
Looking at it more closely, and trying to trace through the code, it appears to 
explicitly withhold WHERE clause info for the second plugin/table in our query.
I have a better/simpler  SQL example below.
select * 
from aws2.AUS_SD.route_header rh, aws.AUS_SD.status s 
where rh.status_id = s.id and rh.employee_id = 18120 and s.id = 7;

In this case, the query that Drill sends for the “rh” table includes the WHERE 
clause “rh.employee_id = 18120”, but Drill sends the query for the “s” table 
without the “s.id = 7”.
Since these tables have millions of rows, we need to have the where clauses 
“remoted” along with the selects. 
See plan below.


{code: borderStyle=solid}

00-00    Screen : rowType = RecordType(DECIMAL(10, 0) ID, DECIMAL(10, 0) 
ROUTE_ID, TIMESTAMP(0) DOWNLOAD_DATE, TIMESTAMP(0) DELIVERY_DATE, DECIMAL(10, 
0) EMPLOYEE_ID, DECIMAL(10, 0) STATUS_ID, VARCHAR(1) ROUTE_SETTLED_FLAG, FLOAT 
TOTAL_PREBILL_AMT, FLOAT TOTAL_ROUTE_ADJ, FLOAT TOTAL_TODATE_ADJ, FLOAT 
TOTAL_COMP_COLLECTED, FLOAT TOTAL_ROUTE_COLLECTED, FLOAT ROUTE_BANK_DEPOSIT, 
FLOAT ROUTE_OVER_SHORT, FLOAT TOTAL_ROUTE_EXPENSE, FLOAT FOOD_EXPENSE_AMT, 
FLOAT FUEL_EXPENSE_AMT, FLOAT REPAIRS_EXPENSE_AMT, FLOAT MON_ORDER_EXPENSE_AMT, 
TIMESTAMP(0) DEPOSIT_DATE, FLOAT COMPUTER_OFFICE_ADJ, FLOAT 
LODGING_EXPENSE_AMT, VARCHAR(3) NO_OF_INVOICES, VARCHAR(7) FIRST_INVOICE_NO, 
VARCHAR(7) LAST_INVOICE_NO, FLOAT PARKING_EXPENSE_AMT, FLOAT TOLL_EXPENSE_AMT, 
VARCHAR(255) EXPENSE_NOTES, DECIMAL(10, 0) SERVICE_DESK_STATUS_ID, VARCHAR(3) 
DISPLAY_APPROVAL_RANK, DECIMAL(10, 0) OFFSET_DAYS, DECIMAL(10, 0) PRINT_COUNT, 
TIMESTAMP(0) PRINT_DATE, DECIMAL(10, 0) PRINT_EMPLOYEE_ID, DECIMAL(10, 0) 
ACTUAL_EMPLOYEE_ID, TIMESTAMP(0) COMMS_OVERRIDE_DT, DECIMAL(10, 0) 
DEPOSIT_SLIP_PRINT_COUNT, TIMESTAMP(0) DEPOSIT_SLIP_PRINT_DATE, DECIMAL(10, 0) 
DEPOSIT_SLIP_PRINT_EMPLOYEE_ID, VARCHAR(1) ACCIDENT_FREE_DAY, VARCHAR(1) 
DOT_LOG_COMPLETE, VARCHAR(1) VEHICLE_INSPECTION_COMPLETE, VARCHAR(1) 
LCP_AUDITS_COMPLETE, DECIMAL(10, 0) HANGER_COUNT, DECIMAL(10, 0) 
CONTRACTS_RENEWED, DECIMAL(10, 0) DIRECT_SALES_ADS, DECIMAL(10, 0) 
RENTAL_PROSPECTS, DECIMAL(10, 0) SHARED_LEADS, DECIMAL(5, 0) 
DM_DESKTOP_ARCHIVE_FLAG, FLOAT PREBILL_LOSS_RUIN_AMT, FLOAT 
LCP_PREBILL_LOSS_RUIN_AMT, FLOAT LOSS_RUIN_ADJ_AMT, FLOAT 
NOS_LOSS_RUIN_ADJ_AMT, CHAR(1) IS_DELETED, VARCHAR(50) LAST_UPDATED_BY, 
VARCHAR(50) CREATED_BY, VARCHAR(1) DUTY_FREE_MEAL_PERIOD_YN, TIMESTAMP(6) 
CREATED_DATE_TIME, TIMESTAMP(6) LAST_UPDATED_DATE_TIME, DECIMAL(10, 0) ID0, 
VARCHAR(10) ABBR, VARCHAR(30) FULL_NAME, DECIMAL(10, 0) SORT, CHAR(1) 
IS_DELETED0, VARCHAR(50) LAST_UPDATED_BY0, VARCHAR(50) CREATED_BY0, 
TIMESTAMP(6) CREATED_DATE_TIME0, TIMESTAMP(6) LAST_UPDATED_DATE_TIME0): 
rowcount = 15.0, cumulative cost = {261.5 rows, 891.5 cpu, 0.0 io, 0.0 network, 
264.0 memory}, id = 1571
00-01      Project(ID=[$0], ROUTE_ID=[$1], DOWNLOAD_DATE=[$2], 
DELIVERY_DATE=[$3], EMPLOYEE_ID=[$4], STATUS_ID=[$5], ROUTE_SETTLED_FLAG=[$6], 
TOTAL_PREBILL_AMT=[$7], TOTAL_ROUTE_ADJ=[$8], TOTAL_TODATE_ADJ=[$9], 
TOTAL_COMP_COLLECTED=[$10], TOTAL_ROUTE_COLLECTED=[$11], 
ROUTE_BANK_DEPOSIT=[$12], ROUTE_OVER_SHORT=[$13], TOTAL_ROUTE_EXPENSE=[$14], 
FOOD_EXPENSE_AMT=[$15], FUEL_EXPENSE_AMT=[$16], REPAIRS_EXPENSE_AMT=[$17], 
MON_ORDER_EXPENSE_AMT=[$18], DEPOSIT_DATE=[$19], COMPUTER_OFFICE_ADJ=[$20], 
LODGING_EXPENSE_AMT=[$21], NO_OF_INVOICES=[$22], FIRST_INVOICE_NO=[$23], 
LAST_INVOICE_NO=[$24], PARKING_EXPENSE_AMT=[$25], TOLL_EXPENSE_AMT=[$26], 
EXPENSE_NOTES=[$27], SERVICE_DESK_STATUS_ID=[$28], DISPLAY_APPROVAL_RANK=[$29], 
OFFSET_DAYS=[$30], PRINT_COUNT=[$31], PRINT_DATE=[$32], 
PRINT_EMPLOYEE_ID=[$33], ACTUAL_EMPLOYEE_ID=[$34], COMMS_OVERRIDE_DT=[$35], 
DEPOSIT_SLIP_PRINT_COUNT=[$36], DEPOSIT_SLIP_PRINT_DATE=[$37], 
DEPOSIT_SLIP_PRINT_EMPLOYEE_ID=[$38], ACCIDENT_FREE_DAY=[$39], 
DOT_LOG_COMPLETE=[$40], VEHICLE_INSPECTION_COMPLETE=[$41], 
LCP_AUDITS_COMPLETE=[$42], HANGER_COUNT=[$43], CONTRACTS_RENEWED=[$44], 
DIRECT_SALES_ADS=[$45], RENTAL_PROSPECTS=[$46], SHARED_LEADS=[$47], 
DM_DESKTOP_ARCHIVE_FLAG=[$48], PREBILL_LOSS_RUIN_AMT=[$49], 
LCP_PREBILL_LOSS_RUIN_AMT=[$50], LOSS_RUIN_ADJ_AMT=[$51], 
NOS_LOSS_RUIN_ADJ_AMT=[$52], IS_DELETED=[$53], LAST_UPDATED_BY=[$54], 
CREATED_BY=[$55], DUTY_FREE_MEAL_PERIOD_YN=[$56], CREATED_DATE_TIME=[$57], 
LAST_UPDATED_DATE_TIME=[$58], ID0=[$59], ABBR=[$60], FULL_NAME=[$61], 
SORT=[$62], IS_DELETED0=[$63], LAST_UPDATED_BY0=[$64], CREATED_BY0=[$65], 
CREATED_DATE_TIME0=[$66], LAST_UPDATED_DATE_TIME0=[$67]) : rowType = 
RecordType(DECIMAL(10, 0) ID, DECIMAL(10, 0) ROUTE_ID, TIMESTAMP(0) 
DOWNLOAD_DATE, TIMESTAMP(0) DELIVERY_DATE, DECIMAL(10, 0) EMPLOYEE_ID, 
DECIMAL(10, 0) STATUS_ID, VARCHAR(1) ROUTE_SETTLED_FLAG, FLOAT 
TOTAL_PREBILL_AMT, FLOAT TOTAL_ROUTE_ADJ, FLOAT TOTAL_TODATE_ADJ, FLOAT 
TOTAL_COMP_COLLECTED, FLOAT TOTAL_ROUTE_COLLECTED, FLOAT ROUTE_BANK_DEPOSIT, 
FLOAT ROUTE_OVER_SHORT, FLOAT TOTAL_ROUTE_EXPENSE, FLOAT FOOD_EXPENSE_AMT, 
FLOAT FUEL_EXPENSE_AMT, FLOAT REPAIRS_EXPENSE_AMT, FLOAT MON_ORDER_EXPENSE_AMT, 
TIMESTAMP(0) DEPOSIT_DATE, FLOAT COMPUTER_OFFICE_ADJ, FLOAT 
LODGING_EXPENSE_AMT, VARCHAR(3) NO_OF_INVOICES, VARCHAR(7) FIRST_INVOICE_NO, 
VARCHAR(7) LAST_INVOICE_NO, FLOAT PARKING_EXPENSE_AMT, FLOAT TOLL_EXPENSE_AMT, 
VARCHAR(255) EXPENSE_NOTES, DECIMAL(10, 0) SERVICE_DESK_STATUS_ID, VARCHAR(3) 
DISPLAY_APPROVAL_RANK, DECIMAL(10, 0) OFFSET_DAYS, DECIMAL(10, 0) PRINT_COUNT, 
TIMESTAMP(0) PRINT_DATE, DECIMAL(10, 0) PRINT_EMPLOYEE_ID, DECIMAL(10, 0) 
ACTUAL_EMPLOYEE_ID, TIMESTAMP(0) COMMS_OVERRIDE_DT, DECIMAL(10, 0) 
DEPOSIT_SLIP_PRINT_COUNT, TIMESTAMP(0) DEPOSIT_SLIP_PRINT_DATE, DECIMAL(10, 0) 
DEPOSIT_SLIP_PRINT_EMPLOYEE_ID, VARCHAR(1) ACCIDENT_FREE_DAY, VARCHAR(1) 
DOT_LOG_COMPLETE, VARCHAR(1) VEHICLE_INSPECTION_COMPLETE, VARCHAR(1) 
LCP_AUDITS_COMPLETE, DECIMAL(10, 0) HANGER_COUNT, DECIMAL(10, 0) 
CONTRACTS_RENEWED, DECIMAL(10, 0) DIRECT_SALES_ADS, DECIMAL(10, 0) 
RENTAL_PROSPECTS, DECIMAL(10, 0) SHARED_LEADS, DECIMAL(5, 0) 
DM_DESKTOP_ARCHIVE_FLAG, FLOAT PREBILL_LOSS_RUIN_AMT, FLOAT 
LCP_PREBILL_LOSS_RUIN_AMT, FLOAT LOSS_RUIN_ADJ_AMT, FLOAT 
NOS_LOSS_RUIN_ADJ_AMT, CHAR(1) IS_DELETED, VARCHAR(50) LAST_UPDATED_BY, 
VARCHAR(50) CREATED_BY, VARCHAR(1) DUTY_FREE_MEAL_PERIOD_YN, TIMESTAMP(6) 
CREATED_DATE_TIME, TIMESTAMP(6) LAST_UPDATED_DATE_TIME, DECIMAL(10, 0) ID0, 
VARCHAR(10) ABBR, VARCHAR(30) FULL_NAME, DECIMAL(10, 0) SORT, CHAR(1) 
IS_DELETED0, VARCHAR(50) LAST_UPDATED_BY0, VARCHAR(50) CREATED_BY0, 
TIMESTAMP(6) CREATED_DATE_TIME0, TIMESTAMP(6) LAST_UPDATED_DATE_TIME0): 
rowcount = 15.0, cumulative cost = {260.0 rows, 890.0 cpu, 0.0 io, 0.0 network, 
264.0 memory}, id = 1570
00-02        HashJoin(condition=[=($5, $59)], joinType=[inner]) : rowType = 
RecordType(DECIMAL(10, 0) ID, DECIMAL(10, 0) ROUTE_ID, TIMESTAMP(0) 
DOWNLOAD_DATE, TIMESTAMP(0) DELIVERY_DATE, DECIMAL(10, 0) EMPLOYEE_ID, 
DECIMAL(10, 0) STATUS_ID, VARCHAR(1) ROUTE_SETTLED_FLAG, FLOAT 
TOTAL_PREBILL_AMT, FLOAT TOTAL_ROUTE_ADJ, FLOAT TOTAL_TODATE_ADJ, FLOAT 
TOTAL_COMP_COLLECTED, FLOAT TOTAL_ROUTE_COLLECTED, FLOAT ROUTE_BANK_DEPOSIT, 
FLOAT ROUTE_OVER_SHORT, FLOAT TOTAL_ROUTE_EXPENSE, FLOAT FOOD_EXPENSE_AMT, 
FLOAT FUEL_EXPENSE_AMT, FLOAT REPAIRS_EXPENSE_AMT, FLOAT MON_ORDER_EXPENSE_AMT, 
TIMESTAMP(0) DEPOSIT_DATE, FLOAT COMPUTER_OFFICE_ADJ, FLOAT 
LODGING_EXPENSE_AMT, VARCHAR(3) NO_OF_INVOICES, VARCHAR(7) FIRST_INVOICE_NO, 
VARCHAR(7) LAST_INVOICE_NO, FLOAT PARKING_EXPENSE_AMT, FLOAT TOLL_EXPENSE_AMT, 
VARCHAR(255) EXPENSE_NOTES, DECIMAL(10, 0) SERVICE_DESK_STATUS_ID, VARCHAR(3) 
DISPLAY_APPROVAL_RANK, DECIMAL(10, 0) OFFSET_DAYS, DECIMAL(10, 0) PRINT_COUNT, 
TIMESTAMP(0) PRINT_DATE, DECIMAL(10, 0) PRINT_EMPLOYEE_ID, DECIMAL(10, 0) 
ACTUAL_EMPLOYEE_ID, TIMESTAMP(0) COMMS_OVERRIDE_DT, DECIMAL(10, 0) 
DEPOSIT_SLIP_PRINT_COUNT, TIMESTAMP(0) DEPOSIT_SLIP_PRINT_DATE, DECIMAL(10, 0) 
DEPOSIT_SLIP_PRINT_EMPLOYEE_ID, VARCHAR(1) ACCIDENT_FREE_DAY, VARCHAR(1) 
DOT_LOG_COMPLETE, VARCHAR(1) VEHICLE_INSPECTION_COMPLETE, VARCHAR(1) 
LCP_AUDITS_COMPLETE, DECIMAL(10, 0) HANGER_COUNT, DECIMAL(10, 0) 
CONTRACTS_RENEWED, DECIMAL(10, 0) DIRECT_SALES_ADS, DECIMAL(10, 0) 
RENTAL_PROSPECTS, DECIMAL(10, 0) SHARED_LEADS, DECIMAL(5, 0) 
DM_DESKTOP_ARCHIVE_FLAG, FLOAT PREBILL_LOSS_RUIN_AMT, FLOAT 
LCP_PREBILL_LOSS_RUIN_AMT, FLOAT LOSS_RUIN_ADJ_AMT, FLOAT 
NOS_LOSS_RUIN_ADJ_AMT, CHAR(1) IS_DELETED, VARCHAR(50) LAST_UPDATED_BY, 
VARCHAR(50) CREATED_BY, VARCHAR(1) DUTY_FREE_MEAL_PERIOD_YN, TIMESTAMP(6) 
CREATED_DATE_TIME, TIMESTAMP(6) LAST_UPDATED_DATE_TIME, DECIMAL(10, 0) ID0, 
VARCHAR(10) ABBR, VARCHAR(30) FULL_NAME, DECIMAL(10, 0) SORT, CHAR(1) 
IS_DELETED0, VARCHAR(50) LAST_UPDATED_BY0, VARCHAR(50) CREATED_BY0, 
TIMESTAMP(6) CREATED_DATE_TIME0, TIMESTAMP(6) LAST_UPDATED_DATE_TIME0): 
rowcount = 15.0, cumulative cost = {260.0 rows, 890.0 cpu, 0.0 io, 0.0 network, 
264.0 memory}, id = 1569
00-03          Project(ID0=[$0], ABBR=[$1], FULL_NAME=[$2], SORT=[$3], 
IS_DELETED0=[$4], LAST_UPDATED_BY0=[$5], CREATED_BY0=[$6], 
CREATED_DATE_TIME0=[$7], LAST_UPDATED_DATE_TIME0=[$8]) : rowType = 
RecordType(DECIMAL(10, 0) ID0, VARCHAR(10) ABBR, VARCHAR(30) FULL_NAME, 
DECIMAL(10, 0) SORT, CHAR(1) IS_DELETED0, VARCHAR(50) LAST_UPDATED_BY0, 
VARCHAR(50) CREATED_BY0, TIMESTAMP(6) CREATED_DATE_TIME0, TIMESTAMP(6) 
LAST_UPDATED_DATE_TIME0): rowcount = 15.0, cumulative cost = {215.0 rows, 575.0 
cpu, 0.0 io, 0.0 network, 0.0 memory}, id = 1568
00-05            SelectionVectorRemover : rowType = RecordType(DECIMAL(10, 0) 
ID, VARCHAR(10) ABBR, VARCHAR(30) FULL_NAME, DECIMAL(10, 0) SORT, CHAR(1) 
IS_DELETED, VARCHAR(50) LAST_UPDATED_BY, VARCHAR(50) CREATED_BY, TIMESTAMP(6) 
CREATED_DATE_TIME, TIMESTAMP(6) LAST_UPDATED_DATE_TIME): rowcount = 15.0, 
cumulative cost = {215.0 rows, 575.0 cpu, 0.0 io, 0.0 network, 0.0 memory}, id 
= 1567
00-06              Filter(condition=[=($0, 7)]) : rowType = 
RecordType(DECIMAL(10, 0) ID, VARCHAR(10) ABBR, VARCHAR(30) FULL_NAME, 
DECIMAL(10, 0) SORT, CHAR(1) IS_DELETED, VARCHAR(50) LAST_UPDATED_BY, 
VARCHAR(50) CREATED_BY, TIMESTAMP(6) CREATED_DATE_TIME, TIMESTAMP(6) 
LAST_UPDATED_DATE_TIME): rowcount = 15.0, cumulative cost = {200.0 rows, 560.0 
cpu, 0.0 io, 0.0 network, 0.0 memory}, id = 1566
00-07                Jdbc(sql=[SELECT *
FROM "AUS_SD"."STATUS"]) : rowType = RecordType(DECIMAL(10, 0) ID, VARCHAR(10) 
ABBR, VARCHAR(30) FULL_NAME, DECIMAL(10, 0) SORT, CHAR(1) IS_DELETED, 
VARCHAR(50) LAST_UPDATED_BY, VARCHAR(50) CREATED_BY, TIMESTAMP(6) 
CREATED_DATE_TIME, TIMESTAMP(6) LAST_UPDATED_DATE_TIME): rowcount = 100.0, 
cumulative cost = {100.0 rows, 100.0 cpu, 0.0 io, 0.0 network, 0.0 memory}, id 
= 1514
00-04          Jdbc(sql=[SELECT *
FROM "AUS_SD"."ROUTE_HEADER"
WHERE "EMPLOYEE_ID" = 18120]) : rowType = RecordType(DECIMAL(10, 0) ID, 
DECIMAL(10, 0) ROUTE_ID, TIMESTAMP(0) DOWNLOAD_DATE, TIMESTAMP(0) 
DELIVERY_DATE, DECIMAL(10, 0) EMPLOYEE_ID, DECIMAL(10, 0) STATUS_ID, VARCHAR(1) 
ROUTE_SETTLED_FLAG, FLOAT TOTAL_PREBILL_AMT, FLOAT TOTAL_ROUTE_ADJ, FLOAT 
TOTAL_TODATE_ADJ, FLOAT TOTAL_COMP_COLLECTED, FLOAT TOTAL_ROUTE_COLLECTED, 
FLOAT ROUTE_BANK_DEPOSIT, FLOAT ROUTE_OVER_SHORT, FLOAT TOTAL_ROUTE_EXPENSE, 
FLOAT FOOD_EXPENSE_AMT, FLOAT FUEL_EXPENSE_AMT, FLOAT REPAIRS_EXPENSE_AMT, 
FLOAT MON_ORDER_EXPENSE_AMT, TIMESTAMP(0) DEPOSIT_DATE, FLOAT 
COMPUTER_OFFICE_ADJ, FLOAT LODGING_EXPENSE_AMT, VARCHAR(3) NO_OF_INVOICES, 
VARCHAR(7) FIRST_INVOICE_NO, VARCHAR(7) LAST_INVOICE_NO, FLOAT 
PARKING_EXPENSE_AMT, FLOAT TOLL_EXPENSE_AMT, VARCHAR(255) EXPENSE_NOTES, 
DECIMAL(10, 0) SERVICE_DESK_STATUS_ID, VARCHAR(3) DISPLAY_APPROVAL_RANK, 
DECIMAL(10, 0) OFFSET_DAYS, DECIMAL(10, 0) PRINT_COUNT, TIMESTAMP(0) 
PRINT_DATE, DECIMAL(10, 0) PRINT_EMPLOYEE_ID, DECIMAL(10, 0) 
ACTUAL_EMPLOYEE_ID, TIMESTAMP(0) COMMS_OVERRIDE_DT, DECIMAL(10, 0) 
DEPOSIT_SLIP_PRINT_COUNT, TIMESTAMP(0) DEPOSIT_SLIP_PRINT_DATE, DECIMAL(10, 0) 
DEPOSIT_SLIP_PRINT_EMPLOYEE_ID, VARCHAR(1) ACCIDENT_FREE_DAY, VARCHAR(1) 
DOT_LOG_COMPLETE, VARCHAR(1) VEHICLE_INSPECTION_COMPLETE, VARCHAR(1) 
LCP_AUDITS_COMPLETE, DECIMAL(10, 0) HANGER_COUNT, DECIMAL(10, 0) 
CONTRACTS_RENEWED, DECIMAL(10, 0) DIRECT_SALES_ADS, DECIMAL(10, 0) 
RENTAL_PROSPECTS, DECIMAL(10, 0) SHARED_LEADS, DECIMAL(5, 0) 
DM_DESKTOP_ARCHIVE_FLAG, FLOAT PREBILL_LOSS_RUIN_AMT, FLOAT 
LCP_PREBILL_LOSS_RUIN_AMT, FLOAT LOSS_RUIN_ADJ_AMT, FLOAT 
NOS_LOSS_RUIN_ADJ_AMT, CHAR(1) IS_DELETED, VARCHAR(50) LAST_UPDATED_BY, 
VARCHAR(50) CREATED_BY, VARCHAR(1) DUTY_FREE_MEAL_PERIOD_YN, TIMESTAMP(6) 
CREATED_DATE_TIME, TIMESTAMP(6) LAST_UPDATED_DATE_TIME): rowcount = 15.0, 
cumulative cost = {15.0 rows, 15.0 cpu, 0.0 io, 0.0 network, 0.0 memory}, id = 
1510

{code}


> Query across Sybase and Oracle plugins is dropping WHERE clause
> ---------------------------------------------------------------
>
>                 Key: DRILL-4900
>                 URL: https://issues.apache.org/jira/browse/DRILL-4900
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Client - JDBC, Storage - JDBC
>    Affects Versions: 1.6.0
>         Environment: Windows client. Sybase and Oracle hosts on unix
>            Reporter: Robert DeVito
>
> Have tried several approaches of joining simple queries with Oracle and 
> Sybase. In all cases, we have sufficient WHERE clause on each side to really 
> limit data. Each time, the Drill execution plan skips the WHERE clause on one 
> side.
> ex:
> select a.f, b.b
> from
> (
>       select * from  pl1.`owner`.`dbo`.`VIEW1` d
>       where d.fid = '0000300769'
>       and d.PDate = ('2013-10-31') 
> ) a,
> (
>       select * from pl2.owner.VIEW2 v
>       where v.f = '0000300769'
>       and v.d = 'M'
>       and v.b  IN 
> ('UK221','UK222','UK223','UK224','UK225','UK227','08843','BU5552','BU5543','BU5544')
>       and v.dk = '20131031'
> ) b
> where a.f = b.f
> and a.S   = b.S
> Please ignore the obfuscated column names. Syntax is valid, but Drill keeps 
> sending selects with no WHERE clause for one subquery or the other. Can't 
> understand why, or how to control it. This is a make or break for us.
> Thanks



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to