[JBoss JIRA] (TEIID-3995) SAP HANA materialization:function loadMatView with argument invalidate set to true problem
by Jan Stastny (JIRA)
Jan Stastny created TEIID-3995:
----------------------------------
Summary: SAP HANA materialization:function loadMatView with argument invalidate set to true problem
Key: TEIID-3995
URL: https://issues.jboss.org/browse/TEIID-3995
Project: Teiid
Issue Type: Bug
Reporter: Jan Stastny
Assignee: Steven Hawkins
There appears to be an issue with loadMatView function.
Specifically when the function is invoked with invalidate=>'true' argument, when it is expected, that invocation of this function invalidates the current contents of the materialized view until the initiated load is completed and new data are populated.
But when calling this function as described, an error occurs:
{code:plain}
TEIID20001 The modeled datatype integer for column 0 doesn't match the runtime type "org.teiid.core.types.ArrayImpl". Please ensure that the column's modeled datatype matches the expected data.
{code}
Please note, that there is no column of type array in my schema.
There is declaration of the view:
{code:sql}
CREATE VIEW external_long_ttl (
customer_id integer NOT NULL,
total_amount integer
)
{code}
and the query used to load the view:
{code:sql}
"teiid_rel:MATVIEW_LOAD_SCRIPT" 'INSERT INTO dv_matviews_mat_view_stage(customer_id,total_amount) SELECT CONVERT(c.id,integer) AS customer_id, CONVERT(SUM(o.amount),integer) AS total_amount FROM dv_matviews_customers c INNER JOIN dv_matviews_orders o ON c.id = o.customer_id GROUP BY c.id;',
{code}
Complete definition of the view is:
{code:sql}
CREATE VIEW external_long_ttl (
customer_id integer NOT NULL,
total_amount integer
) OPTIONS (
MATERIALIZED 'TRUE',
UPDATABLE 'FALSE',
MATERIALIZED_TABLE 'Source.JSTASTNY.dv_matviews_mat_view',
"teiid_rel:ALLOW_MATVIEW_MANAGEMENT" 'true',
"teiid_rel:MATVIEW_STATUS_TABLE" 'Source.JSTASTNY.dv_matviews_statustable',
"teiid_rel:ON_VDB_START_SCRIPT" 'MERGE INTO dv_matviews_check_table(id,vdb_create) SELECT id, vdb_create+1 FROM dv_matviews_check_table WHERE id=''external_long_ttl'';',
"teiid_rel:ON_VDB_DROP_SCRIPT" 'MERGE INTO dv_matviews_check_table(id,vdb_drop) SELECT id, vdb_drop+1 FROM dv_matviews_check_table WHERE id=''external_long_ttl'';',
"teiid_rel:MATVIEW_LOAD_SCRIPT" 'INSERT INTO dv_matviews_mat_view_stage(customer_id,total_amount) SELECT CONVERT(c.id,integer) AS customer_id, CONVERT(SUM(o.amount),integer) AS total_amount FROM dv_matviews_customers c INNER JOIN dv_matviews_orders o ON c.id = o.customer_id GROUP BY c.id;',
"teiid_rel:MATVIEW_BEFORE_LOAD_SCRIPT" 'exec Source.native(''truncate table dv_matviews_mat_view_stage'');MERGE INTO dv_matviews_check_table(id,before_load) SELECT id, before_load+1 FROM dv_matviews_check_table WHERE id=''external_long_ttl'';',
"teiid_rel:MATVIEW_AFTER_LOAD_SCRIPT" 'exec Source.native(''RENAME TABLE dv_matviews_mat_view_stage TO dv_matviews_mat_view_temp'');exec Source.native(''RENAME TABLE dv_matviews_mat_view TO dv_matviews_mat_view_stage'');exec Source.native(''RENAME TABLE dv_matviews_mat_view_temp TO dv_matviews_mat_view'');MERGE INTO dv_matviews_check_table(id,after_load) SELECT id, after_load+1 FROM dv_matviews_check_table WHERE id=''external_long_ttl'';',
"teiid_rel:MATVIEW_ONERROR_ACTION" 'WAIT',
"teiid_rel:MATVIEW_TTL" 20000
) AS SELECT CONVERT(c.id,integer) AS customer_id, CONVERT(SUM(o.amount),integer) AS total_amount FROM dv_matviews_customers c INNER JOIN dv_matviews_orders o ON c.id = o.customer_id GROUP BY c.id;
{code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months
[JBoss JIRA] (TEIID-3994) AliasSymbol wrapping AliasSymbol error
by Steve Tran (JIRA)
[ https://issues.jboss.org/browse/TEIID-3994?page=com.atlassian.jira.plugin... ]
Steve Tran updated TEIID-3994:
------------------------------
Description:
I've defined a view and overrode the default triggers for Select, Insert, Update, and Delete. I overrode the triggers because the select is returning "hardcoded" values for a few fields (calling them virtual columns). The Update and Insert triggers will ignore these hardcoded values just in case the caller tries to update a virtual column.
I'm trying to run a insert into <tableA> select * from <tableB> query. When I run this, I get an error org.teiid.jdbc.TeiidSQLException: Cannot create AliasSymbol wrapping AliasSymbol.
Facts:
-- I can insert a record if I only select one column from tableB.
-- If I select two or more columns, it throws the error every time.
-- If I remove the overridden triggers, the insert into <tableA> select * from <tableB> works fine.
-- I can insert one or more columns into <tableA> when *not* using a insert into <tableA> select * from <tableB> query
-- Table A is Oracle
-- Table B is SQL Server
My hunch is the generated query (hibernate, or whatever SQL generator) is choking with the overridden trigger. Perhaps this use-case slipped through testing, or even more probable, I made a mistake in the trigger creation.
Here's a snip of the insert trigger, with a lot of fields removed for simplicity.
{code}
FOR EACH ROW
BEGIN ATOMIC
INSERT INTO <schema>.<tableA> (SourceSystemID, RecordTypeID, BatchID ...)
VALUES (
convert("NEW".SourceSystemID, short),
convert("NEW".RecordTypeID, short),
convert("NEW".BatchID, integer)
...
)
END
{code}
was:
I've defined a view and overrode the default triggers for Select, Insert, Update, and Delete. I overrode the triggers because the select is returning "hardcoded" values for a few fields (calling them virtual columns). The Update and Insert triggers will ignore these hardcoded values just in case the caller tries to update a virtual column.
I'm trying to run a insert into <tableA> select * from <tableB> query. When I run this, I get an error org.teiid.jdbc.TeiidSQLException: Cannot create AliasSymbol wrapping AliasSymbol.
Facts:
-- I can insert a record if I only select one column from tableB.
-- If I select two or more columns, it throws the error every time.
-- If I remove the overridden triggers, the insert into <tableA> select * from <tableB> works fine.
-- I can insert one or more columns into <tableA> when *not* using a insert into <tableA> select * from <tableB> query
My hunch is the generated query (hibernate, or whatever SQL generator) is choking with the overridden trigger. Perhaps this use-case slipped through testing, or even more probable, I made a mistake in the trigger creation.
Here's a snip of the insert trigger, with a lot of fields removed for simplicity.
{code}
FOR EACH ROW
BEGIN ATOMIC
INSERT INTO <schema>.<tableA> (SourceSystemID, RecordTypeID, BatchID ...)
VALUES (
convert("NEW".SourceSystemID, short),
convert("NEW".RecordTypeID, short),
convert("NEW".BatchID, integer)
...
)
END
{code}
> AliasSymbol wrapping AliasSymbol error
> --------------------------------------
>
> Key: TEIID-3994
> URL: https://issues.jboss.org/browse/TEIID-3994
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.7.1.6_2
> Environment: Red Hat JBoss Data Virtualization 6.2 on EAP6.4.0 patched to version 6.4.3,
> JBoss Developer Studio 8.1.0GA with Teiid Designer plugin 9.0.3.Final.v20150810-1438-B1157
> 64-bit Windows 7 environment
> Reporter: Steve Tran
> Assignee: Steven Hawkins
>
> I've defined a view and overrode the default triggers for Select, Insert, Update, and Delete. I overrode the triggers because the select is returning "hardcoded" values for a few fields (calling them virtual columns). The Update and Insert triggers will ignore these hardcoded values just in case the caller tries to update a virtual column.
> I'm trying to run a insert into <tableA> select * from <tableB> query. When I run this, I get an error org.teiid.jdbc.TeiidSQLException: Cannot create AliasSymbol wrapping AliasSymbol.
> Facts:
> -- I can insert a record if I only select one column from tableB.
> -- If I select two or more columns, it throws the error every time.
> -- If I remove the overridden triggers, the insert into <tableA> select * from <tableB> works fine.
> -- I can insert one or more columns into <tableA> when *not* using a insert into <tableA> select * from <tableB> query
> -- Table A is Oracle
> -- Table B is SQL Server
> My hunch is the generated query (hibernate, or whatever SQL generator) is choking with the overridden trigger. Perhaps this use-case slipped through testing, or even more probable, I made a mistake in the trigger creation.
> Here's a snip of the insert trigger, with a lot of fields removed for simplicity.
> {code}
> FOR EACH ROW
> BEGIN ATOMIC
> INSERT INTO <schema>.<tableA> (SourceSystemID, RecordTypeID, BatchID ...)
> VALUES (
> convert("NEW".SourceSystemID, short),
> convert("NEW".RecordTypeID, short),
> convert("NEW".BatchID, integer)
> ...
> )
> END
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months
[JBoss JIRA] (TEIID-3994) AliasSymbol wrapping AliasSymbol error
by Steve Tran (JIRA)
[ https://issues.jboss.org/browse/TEIID-3994?page=com.atlassian.jira.plugin... ]
Steve Tran updated TEIID-3994:
------------------------------
Description:
I've defined a view and overrode the default triggers for Select, Insert, Update, and Delete. I overrode the triggers because the select is returning "hardcoded" values for a few fields (calling them virtual columns). The Update and Insert triggers will ignore these hardcoded values just in case the caller tries to update a virtual column.
I'm trying to run a insert into <tableA> select * from <tableB> query. When I run this, I get an error org.teiid.jdbc.TeiidSQLException: Cannot create AliasSymbol wrapping AliasSymbol.
Facts:
-- I can insert a record if I only select one column from tableB.
-- If I select two or more columns, it throws the error every time.
-- If I remove the overridden triggers, the insert into <tableA> select * from <tableB> works fine.
-- I can insert one or more columns into <tableA> when *not* using a insert into <tableA> select * from <tableB> query
My hunch is the generated query (hibernate, or whatever SQL generator) is choking with the overridden trigger. Perhaps this use-case slipped through testing, or even more probable, I made a mistake in the trigger creation.
Here's a snip of the insert trigger, with a lot of fields removed for simplicity.
{code}
FOR EACH ROW
BEGIN ATOMIC
INSERT INTO <schema>.<tableA> (SourceSystemID, RecordTypeID, BatchID ...)
VALUES (
convert("NEW".SourceSystemID, short),
convert("NEW".RecordTypeID, short),
convert("NEW".BatchID, integer)
...
)
END
{code}
was:
I've defined a view and overrode the default triggers for Select, Insert, Update, and Delete. I overrode the triggers because the select is returning "hardcoded" values for a few fields (calling them virtual columns). The Update and Insert triggers will ignore these hardcoded values just in case the caller tries to update a virtual column.
I'm trying to run a insert into <tableA> select * from <tableB> query. When I run this, I get an error org.teiid.jdbc.TeiidSQLException: Cannot create AliasSymbol wrapping AliasSymbol.
Facts:
-- I can insert a record if I only select one column from tableB.
-- If I select two or more columns, it throws the error every time.
-- If I remove the overridden triggers, the insert into <tableA> select * from <tableB> works fine.
-- I can insert one or more columns into <tableA> when *not* using a insert into <tableA> select * from <tableB> query
My hunch is the generated query (hibernate, or whatever SQL generator) is choking with the overridden trigger. Perhaps this use-case slipped through testing, or even more probable, I made a mistake in the trigger creation.
> AliasSymbol wrapping AliasSymbol error
> --------------------------------------
>
> Key: TEIID-3994
> URL: https://issues.jboss.org/browse/TEIID-3994
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.7.1.6_2
> Environment: Red Hat JBoss Data Virtualization 6.2 on EAP6.4.0 patched to version 6.4.3,
> JBoss Developer Studio 8.1.0GA with Teiid Designer plugin 9.0.3.Final.v20150810-1438-B1157
> 64-bit Windows 7 environment
> Reporter: Steve Tran
> Assignee: Steven Hawkins
>
> I've defined a view and overrode the default triggers for Select, Insert, Update, and Delete. I overrode the triggers because the select is returning "hardcoded" values for a few fields (calling them virtual columns). The Update and Insert triggers will ignore these hardcoded values just in case the caller tries to update a virtual column.
> I'm trying to run a insert into <tableA> select * from <tableB> query. When I run this, I get an error org.teiid.jdbc.TeiidSQLException: Cannot create AliasSymbol wrapping AliasSymbol.
> Facts:
> -- I can insert a record if I only select one column from tableB.
> -- If I select two or more columns, it throws the error every time.
> -- If I remove the overridden triggers, the insert into <tableA> select * from <tableB> works fine.
> -- I can insert one or more columns into <tableA> when *not* using a insert into <tableA> select * from <tableB> query
> My hunch is the generated query (hibernate, or whatever SQL generator) is choking with the overridden trigger. Perhaps this use-case slipped through testing, or even more probable, I made a mistake in the trigger creation.
> Here's a snip of the insert trigger, with a lot of fields removed for simplicity.
> {code}
> FOR EACH ROW
> BEGIN ATOMIC
> INSERT INTO <schema>.<tableA> (SourceSystemID, RecordTypeID, BatchID ...)
> VALUES (
> convert("NEW".SourceSystemID, short),
> convert("NEW".RecordTypeID, short),
> convert("NEW".BatchID, integer)
> ...
> )
> END
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months
[JBoss JIRA] (TEIID-3994) AliasSymbol wrapping AliasSymbol error
by Steve Tran (JIRA)
[ https://issues.jboss.org/browse/TEIID-3994?page=com.atlassian.jira.plugin... ]
Steve Tran updated TEIID-3994:
------------------------------
Description:
I've defined a view and overrode the default triggers for Select, Insert, Update, and Delete. I overrode the triggers because the select is returning "hardcoded" values for a few fields (calling them virtual columns). The Update and Insert triggers will ignore these hardcoded values just in case the caller tries to update a virtual column.
I'm trying to run a insert into <tableA> select * from <tableB> query. When I run this, I get an error org.teiid.jdbc.TeiidSQLException: Cannot create AliasSymbol wrapping AliasSymbol.
Facts:
-- I can insert a record if I only select one column from tableB.
-- If I select two or more columns, it throws the error every time.
-- If I remove the overridden triggers, the insert into <tableA> select * from <tableB> works fine.
-- I can insert one or more columns into <tableA> when *not* using a insert into <tableA> select * from <tableB> query
My hunch is the generated query (hibernate, or whatever SQL generator) is choking with the overridden trigger. Perhaps this use-case slipped through testing, or even more probable, I made a mistake in the trigger creation.
> AliasSymbol wrapping AliasSymbol error
> --------------------------------------
>
> Key: TEIID-3994
> URL: https://issues.jboss.org/browse/TEIID-3994
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.7.1.6_2
> Environment: Red Hat JBoss Data Virtualization 6.2 on EAP6.4.0 patched to version 6.4.3,
> JBoss Developer Studio 8.1.0GA with Teiid Designer plugin 9.0.3.Final.v20150810-1438-B1157
> 64-bit Windows 7 environment
> Reporter: Steve Tran
> Assignee: Steven Hawkins
>
> I've defined a view and overrode the default triggers for Select, Insert, Update, and Delete. I overrode the triggers because the select is returning "hardcoded" values for a few fields (calling them virtual columns). The Update and Insert triggers will ignore these hardcoded values just in case the caller tries to update a virtual column.
> I'm trying to run a insert into <tableA> select * from <tableB> query. When I run this, I get an error org.teiid.jdbc.TeiidSQLException: Cannot create AliasSymbol wrapping AliasSymbol.
> Facts:
> -- I can insert a record if I only select one column from tableB.
> -- If I select two or more columns, it throws the error every time.
> -- If I remove the overridden triggers, the insert into <tableA> select * from <tableB> works fine.
> -- I can insert one or more columns into <tableA> when *not* using a insert into <tableA> select * from <tableB> query
> My hunch is the generated query (hibernate, or whatever SQL generator) is choking with the overridden trigger. Perhaps this use-case slipped through testing, or even more probable, I made a mistake in the trigger creation.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months
[JBoss JIRA] (TEIID-3994) AliasSymbol wrapping AliasSymbol error
by Steve Tran (JIRA)
Steve Tran created TEIID-3994:
---------------------------------
Summary: AliasSymbol wrapping AliasSymbol error
Key: TEIID-3994
URL: https://issues.jboss.org/browse/TEIID-3994
Project: Teiid
Issue Type: Bug
Affects Versions: 8.7.1.6_2
Environment: Red Hat JBoss Data Virtualization 6.2 on EAP6.4.0 patched to version 6.4.3,
JBoss Developer Studio 8.1.0GA with Teiid Designer plugin 9.0.3.Final.v20150810-1438-B1157
64-bit Windows 7 environment
Reporter: Steve Tran
Assignee: Steven Hawkins
Priority: Optional
Getting an error when attempting to insert a new row into an virtualized Oracle Table in JDV.
Here's the query
INSERT INTO OPENQUERY(testb, 'SELECT * FROM TestVBL.HSI_AGGR_PROC_LK')
VALUES ('TEST 1:18am', cast (getdate() as date))
{code}
OLE DB provider "MSDASQL" for linked server "testb" returned message "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.".
Msg 7344, Level 16, State 1, Line 1
The OLE DB provider "MSDASQL" for linked server "testb" could not INSERT INTO table "[MSDASQL]" because of column "LK_DT". The user did not have permission to write to the column.
{code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months
[JBoss JIRA] (TEIID-3994) AliasSymbol wrapping AliasSymbol error
by Steve Tran (JIRA)
[ https://issues.jboss.org/browse/TEIID-3994?page=com.atlassian.jira.plugin... ]
Steve Tran updated TEIID-3994:
------------------------------
Steps to Reproduce: (was: On a windows machine with SQL Server, create a Linked Server with ODBC.
INSERT INTO OPENQUERY(testb, 'SELECT * FROM TestVBL.HSI_AGGR_PROC_LK')
VALUES ('TEST 1:18am', cast (getdate() as date))
)
> AliasSymbol wrapping AliasSymbol error
> --------------------------------------
>
> Key: TEIID-3994
> URL: https://issues.jboss.org/browse/TEIID-3994
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.7.1.6_2
> Environment: Red Hat JBoss Data Virtualization 6.2 on EAP6.4.0 patched to version 6.4.3,
> JBoss Developer Studio 8.1.0GA with Teiid Designer plugin 9.0.3.Final.v20150810-1438-B1157
> 64-bit Windows 7 environment
> Reporter: Steve Tran
> Assignee: Steven Hawkins
> Priority: Optional
>
> Getting an error when attempting to insert a new row into an virtualized Oracle Table in JDV.
> Here's the query
> INSERT INTO OPENQUERY(testb, 'SELECT * FROM TestVBL.HSI_AGGR_PROC_LK')
> VALUES ('TEST 1:18am', cast (getdate() as date))
> {code}
> OLE DB provider "MSDASQL" for linked server "testb" returned message "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.".
> Msg 7344, Level 16, State 1, Line 1
> The OLE DB provider "MSDASQL" for linked server "testb" could not INSERT INTO table "[MSDASQL]" because of column "LK_DT". The user did not have permission to write to the column.
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months
[JBoss JIRA] (TEIID-3994) AliasSymbol wrapping AliasSymbol error
by Steve Tran (JIRA)
[ https://issues.jboss.org/browse/TEIID-3994?page=com.atlassian.jira.plugin... ]
Steve Tran updated TEIID-3994:
------------------------------
Priority: Major (was: Optional)
> AliasSymbol wrapping AliasSymbol error
> --------------------------------------
>
> Key: TEIID-3994
> URL: https://issues.jboss.org/browse/TEIID-3994
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.7.1.6_2
> Environment: Red Hat JBoss Data Virtualization 6.2 on EAP6.4.0 patched to version 6.4.3,
> JBoss Developer Studio 8.1.0GA with Teiid Designer plugin 9.0.3.Final.v20150810-1438-B1157
> 64-bit Windows 7 environment
> Reporter: Steve Tran
> Assignee: Steven Hawkins
>
> Getting an error when attempting to insert a new row into an virtualized Oracle Table in JDV.
> Here's the query
> INSERT INTO OPENQUERY(testb, 'SELECT * FROM TestVBL.HSI_AGGR_PROC_LK')
> VALUES ('TEST 1:18am', cast (getdate() as date))
> {code}
> OLE DB provider "MSDASQL" for linked server "testb" returned message "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.".
> Msg 7344, Level 16, State 1, Line 1
> The OLE DB provider "MSDASQL" for linked server "testb" could not INSERT INTO table "[MSDASQL]" because of column "LK_DT". The user did not have permission to write to the column.
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months
[JBoss JIRA] (TEIID-3994) AliasSymbol wrapping AliasSymbol error
by Steve Tran (JIRA)
[ https://issues.jboss.org/browse/TEIID-3994?page=com.atlassian.jira.plugin... ]
Steve Tran updated TEIID-3994:
------------------------------
Description: (was: Getting an error when attempting to insert a new row into an virtualized Oracle Table in JDV.
Here's the query
INSERT INTO OPENQUERY(testb, 'SELECT * FROM TestVBL.HSI_AGGR_PROC_LK')
VALUES ('TEST 1:18am', cast (getdate() as date))
{code}
OLE DB provider "MSDASQL" for linked server "testb" returned message "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.".
Msg 7344, Level 16, State 1, Line 1
The OLE DB provider "MSDASQL" for linked server "testb" could not INSERT INTO table "[MSDASQL]" because of column "LK_DT". The user did not have permission to write to the column.
{code})
> AliasSymbol wrapping AliasSymbol error
> --------------------------------------
>
> Key: TEIID-3994
> URL: https://issues.jboss.org/browse/TEIID-3994
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.7.1.6_2
> Environment: Red Hat JBoss Data Virtualization 6.2 on EAP6.4.0 patched to version 6.4.3,
> JBoss Developer Studio 8.1.0GA with Teiid Designer plugin 9.0.3.Final.v20150810-1438-B1157
> 64-bit Windows 7 environment
> Reporter: Steve Tran
> Assignee: Steven Hawkins
>
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months
[JBoss JIRA] (TEIID-3993) Teiid: indexOutOfBoundsException on union + count distinct query
by Ivan Chan (JIRA)
Ivan Chan created TEIID-3993:
--------------------------------
Summary: Teiid: indexOutOfBoundsException on union + count distinct query
Key: TEIID-3993
URL: https://issues.jboss.org/browse/TEIID-3993
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 8.12.3
Environment: Teiid 8.12.3 + posgtesDB
Reporter: Ivan Chan
Assignee: Steven Hawkins
I ran into IndexOfBoundsException from teiid query optimizer when running the following query:
select "SugarCRMDataSource_public_sales_location"."country" as "SugarCRMDataSource_public_sales_location_country",
"FoodmartDataSource_public_store"."store_country" as "FoodmartDataSource_public_store_store_country",
'1|1' as "JS_Discriminator_COL",
count(DISTINCT "SugarCRMDataSource_public_sales_fact"."amount") as "CountDistinct_SugarCRMDataSource_public_sales_fact_amount"
from "SugarCRMDataSource_public"."sales_fact" "SugarCRMDataSource_public_sales_fact"
inner join "SugarCRMDataSource_public"."sales_location" "SugarCRMDataSource_public_sales_location" on ("SugarCRMDataSource_public_sales_fact"."sales_location_id" = "SugarCRMDataSource_public_sales_location"."id")
inner join "FoodmartDataSource_public"."store" "FoodmartDataSource_public_store" on ("SugarCRMDataSource_public_sales_location"."state" = "FoodmartDataSource_public_store"."store_state")
group by "SugarCRMDataSource_public_sales_location"."country", "FoodmartDataSource_public_store"."store_country"
UNION ALL
select "SugarCRMDataSource_public_sales_location"."country" as "SugarCRMDataSource_public_sales_location_country",
NULL as "FoodmartDataSource_public_store_store_country",
'1|0' as "JS_Discriminator_COL",
count(DISTINCT "SugarCRMDataSource_public_sales_fact"."amount") as "CountDistinct_SugarCRMDataSource_public_sales_fact_amount"
from "SugarCRMDataSource_public"."sales_fact" "SugarCRMDataSource_public_sales_fact"
inner join "SugarCRMDataSource_public"."sales_location" "SugarCRMDataSource_public_sales_location" on ("SugarCRMDataSource_public_sales_fact"."sales_location_id" = "SugarCRMDataSource_public_sales_location"."id")
inner join "FoodmartDataSource_public"."store" "FoodmartDataSource_public_store" on ("SugarCRMDataSource_public_sales_location"."state" = "FoodmartDataSource_public_store"."store_state")
group by "SugarCRMDataSource_public_sales_location"."country"
UNION ALL
select NULL as "SugarCRMDataSource_public_sales_location_country",
"FoodmartDataSource_public_store"."store_country" as "FoodmartDataSource_public_store_store_country",
'0|1' as "JS_Discriminator_COL",
count(DISTINCT "SugarCRMDataSource_public_sales_fact"."amount") as "CountDistinct_SugarCRMDataSource_public_sales_fact_amount"
from "SugarCRMDataSource_public"."sales_fact" "SugarCRMDataSource_public_sales_fact"
inner join "SugarCRMDataSource_public"."sales_location" "SugarCRMDataSource_public_sales_location" on ("SugarCRMDataSource_public_sales_fact"."sales_location_id" = "SugarCRMDataSource_public_sales_location"."id")
inner join "FoodmartDataSource_public"."store" "FoodmartDataSource_public_store" on ("SugarCRMDataSource_public_sales_location"."state" = "FoodmartDataSource_public_store"."store_state")
group by "FoodmartDataSource_public_store"."store_country"
UNION ALL
select NULL as "SugarCRMDataSource_public_sales_location_country",
NULL as "FoodmartDataSource_public_store_store_country",
'0|0' as "JS_Discriminator_COL",
count(DISTINCT "SugarCRMDataSource_public_sales_fact"."amount") as "CountDistinct_SugarCRMDataSource_public_sales_fact_amount"
from "SugarCRMDataSource_public"."sales_fact" "SugarCRMDataSource_public_sales_fact"
inner join "SugarCRMDataSource_public"."sales_location" "SugarCRMDataSource_public_sales_location" on ("SugarCRMDataSource_public_sales_fact"."sales_location_id" = "SugarCRMDataSource_public_sales_location"."id")
inner join "FoodmartDataSource_public"."store" "FoodmartDataSource_public_store" on ("SugarCRMDataSource_public_sales_location"."state" = "FoodmartDataSource_public_store"."store_state")
order by "SugarCRMDataSource_public_sales_location_country", "FoodmartDataSource_public_store_store_country"
limit 1000
And here is the exception:
Caused by: java.lang.IndexOutOfBoundsException: Index: 4, Size: 4
at java.util.ArrayList.rangeCheck(ArrayList.java:635)
at java.util.ArrayList.get(ArrayList.java:411)
at org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.setColStatEstimates(NewCalculateCostUtil.java:411)
at org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.setCardinalityEstimate(NewCalculateCostUtil.java:313)
at org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.estimateSetOpCost(NewCalculateCostUtil.java:252)
at org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.computeNodeCost(NewCalculateCostUtil.java:204)
at org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.updateCardinality(NewCalculateCostUtil.java:136)
at org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.updateCardinality(NewCalculateCostUtil.java:133)
at org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.updateCardinality(NewCalculateCostUtil.java:133)
at org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.computeCostForTree(NewCalculateCostUtil.java:122)
at org.teiid.query.optimizer.relational.rules.RuleCalculateCost.execute(RuleCalculateCost.java:50)
at org.teiid.query.optimizer.relational.RelationalPlanner.executeRules(RelationalPlanner.java:807)
at org.teiid.query.optimizer.relational.RelationalPlanner.optimize(RelationalPlanner.java:223)
at org.teiid.query.optimizer.QueryOptimizer.optimizePlan(QueryOptimizer.java:159)
at org.teiid.dqp.internal.process.Request.generatePlan(Request.java:435)
at org.teiid.dqp.internal.process.PreparedStatementRequest.generatePlan(PreparedStatementRequest.java:119)
at org.teiid.dqp.internal.process.Request.processRequest(Request.java:463)
at org.teiid.dqp.internal.process.PreparedStatementRequest.processRequest(PreparedStatementRequest.java:294)
at org.teiid.dqp.internal.process.RequestWorkItem.processNew(RequestWorkItem.java:640)
at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:337)
... 22 more
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months