dynamobi/dynamobi — Issue #287: [LDB-34] join on two foreign tables in same schema fails
Author: dynamobi-build
Created: 2011-12-30 02:26:53+00:00
State: closed
Labels: LDB

[reporter="boris", created="Thu, 16 Feb 2006 19:48:18 -0500 (GMT-05:00)"]
0: jdbc:luciddb:> create foreign data wrapper mssql_jdbc

. . . . . . . . > library '/home/boris/open/luciddb/plugin/FarragoMedJdbc3p.jar'. . . . . . . . > language java;

No rows affected (2.156 seconds)

0: jdbc:luciddb:>

0: jdbc:luciddb:> create server mssql_server

. . . . . . . . > foreign data wrapper mssql_jdbc

. . . . . . . . > options(

. . . . . . . . > url 'jdbc:jtds:sqlserver://akela.lucidera.com:1433',

. . . . . . . . > user_name 'sa',

. . . . . . . . > password 'XXXXXX',

. . . . . . . . >

. . . . . . . . > qualifying_catalog_name 'mstoneoneapp',

. . . . . . . . > table_types 'TABLE',

. . . . . . . . > driver_class 'net.sourceforge.jtds.jdbc.Driver'

. . . . . . . . >

. . . . . . . . >

. . . . . . . . >

. . . . . . . . >

. . . . . . . . >

. . . . . . . . >

. . . . . . . . >

. . . . . . . . >

. . . . . . . . >

. . . . . . . . >

. . . . . . . . > );

No rows affected (0.118 seconds)

0: jdbc:luciddb:>

0: jdbc:luciddb:> create schema mssql_schema;

No rows affected (0.068 seconds)

0: jdbc:luciddb:> set schema mssql_schema;

0: jdbc:luciddb:> import foreign schema "dwlogin" from server mssql_server into import foreign schema "DWLOGIN" from server mssql_server into mssql_schema;

No rows affected (0.703 seconds)

0: jdbc:luciddb:> !tables

+------------+---------------+---------------+----------------+----------+-----+| TABLE_CAT | TABLE_SCHEM | TABLE_NAME | TABLE_TYPE | REMARKS | TYP |+------------+---------------+---------------+----------------+----------+-----+| LOCALDB | MSSQL_SCHEMA | CUSTOMERS | FOREIGN TABLE | | || LOCALDB | MSSQL_SCHEMA | ORDERS| FOREIGN TABLE | | || LOCALDB | MSSQL_SCHEMA | PRODUCTS | FOREIGN TABLE | | || LOCALDB | MSSQL_SCHEMA | dtproperties | FOREIGN TABLE | | |+------------+---------------+---------------+----------------+----------+-----+0

0: jdbc:luciddb:> select c.companyname from customers c, orders o where c.customerid = o.customerid;

Error: java.lang.AssertionError: Type mismatch:

rowtype of rel before registration:

RecordType(INTEGER ORDERID, INTEGER PRODUCTID, CHAR(5) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" CUSTOMERID, INTEGER EMPLOYEEID, TIMESTAMP(0) ORDERDATE, TIMESTAMP(0) REQUIREDDATE, TIMESTAMP(0) SHIPPEDDATE, INTEGER SHIPVIA, DECIMAL(19, 4) FREIGHT, DECIMAL(19, 4) UNITPRICE, SMALLINT QUANTITY, REAL DISCOUNT, INTEGER ORDERKEY) NOT NULL

rowtype of rel after registration:

RecordType(CHAR(5) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" NOT NULL CUSTOMERID, VARCHAR(40) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" COMPANYNAME, VARCHAR(30) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" CONTACTNAME, VARCHAR(30) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" CONTACTTITLE, VARCHAR(60) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" ADDRESS, VARCHAR(15) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" CITY, VARCHAR(15) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" REGION, VARCHAR(10) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" POSTALCODE, VARCHAR(15) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" COUNTRY, VARCHAR(24) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" PHONE, VARCHAR(24) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" FAX) NOT NULL (state=,code=0)