dynamobi/dynamobi — Issue #866: [FRG-4] join across a foreign table and local table results in an assertion
Author: dynamobi-build
Created: 2011-12-30 03:53:43+00:00
State: open
Labels: FRG, JDBC Foreign Data Wrapper

[reporter="boris", created="Wed, 7 Dec 2005 18:01:49 -0500 (GMT-05:00)"]
(this assumes you have access to machine akela, with a sql server with existing data already loaded.)

create schema s;

set schema 's';

create table LOCATION(

LOCID char(2) primary key,

STREET varchar(50),

CITY varchar(20),

STATE char(2),

ZIP integer)

server sys_ftrs_data_server;

create foreign data wrapper test_jdbc library '../farrago/plugin/FarragoMedJdbc.jar' language java;

create server csv_server

foreign data wrapper test_jdbc

options(

driver_class 'org.relique.jdbc.csv.CsvDriver',

url 'jdbc:relique:csv:test/sql/shortreg',

schema_name 'TESTDATA');

create schema csv_schema;

CREATE foreign table csv_schema.SHORTREG_LOCATION_SRC (

LOCID VARCHAR(2),

STREET VARCHAR(50),

CITY VARCHAR(20),

STATE VARCHAR(2),

ZIP INTEGER

)

server csv_server

options (table_name 'location');

INSERT INTO s.LOCATION

SELECT LOCID,STREET,CITY,STATE,ZIP

FROM csv_schema.SHORTREG_LOCATION_SRC;

import foreign schema "dbo" limit to ("bench1M") from server sql_server into s;

create server sql_server foreign data wrapper test_jdbc options(driver_class 'net.sourceforge.jtds.jdbc.Driver', url 'jdbc:jtds:sqlserver://AKELA.lucidera.com:1433;user=XX;password=XX', QUALIFYING_CATALOG_NAME 'BENCHMARK');

import foreign schema "dbo" limit to ("bench1M") from server sql_server into s;

select "bench1M"."kseq",location.LOCID from "bench1M",location where "bench1M"."k100k"=location.zip;

OUTPUT is the following:

0: jdbc:luciddb:> select "bench1M"."kseq",location.LOCID from "bench1M",location where "bench1M"."k100k"=location.zip;

select "bench1M"."kseq",location.LOCID from "bench1M",location where "bench1M"."k100k"=location.zip;

Error: java.lang.AssertionError: Internal error: node could not be implemented: Subset#4.ITERATOR (state=,code=0)