[JBoss JIRA] (TEIID-3995) SAP HANA materialization:function loadMatView with argument invalidate set to true problem
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3995?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-3995:
---------------------------------------
I'm still not reproducing this. Can you provide the client code and the server log?
> 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
> Components: Query Engine
> Affects Versions: 8.12.x
> 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-4004) Teiid teiid-web-security project can't be built
by Jan Stastny (JIRA)
Jan Stastny created TEIID-4004:
----------------------------------
Summary: Teiid teiid-web-security project can't be built
Key: TEIID-4004
URL: https://issues.jboss.org/browse/TEIID-4004
Project: Teiid
Issue Type: Bug
Components: Tools
Reporter: Jan Stastny
Assignee: Jan Stastny
The project used to build custom OData WAR with different security profiles can't be compiled in maven.
The problem is caused by its module database-service, which is located in ./examples/database-service/pom.xml. Maven complains, that it can't find artifact odata-web-parent, which is the parent project here.
It can be resolved by specifying <relativePath>../../pom.xml</relativePath> in the database-service jar's pom.xml
{code:plain}
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.jboss.teiid:database-service:[unknown-version] (/home/jstastny/gitrepo/teiid-web-security/examples/database-service/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for org.jboss.teiid:database-service:[unknown-version]: Failure to find org.jboss.teiid:odata-web-parent:pom:0.0.1-SNAPSHOT in http://dvqe11.mw.lab.eng.bos.redhat.com:8081/nexus/content/repositories/r... was cached in the local repository, resolution will not be reattempted until the update interval of nexus-releases has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 4, column 13 -> [Help 2]
{code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months
[JBoss JIRA] (TEIID-4003) Vertica and DB2 translators use incorrect push down of WEEK function
by Andrej Šmigala (JIRA)
[ https://issues.jboss.org/browse/TEIID-4003?page=com.atlassian.jira.plugin... ]
Andrej Šmigala updated TEIID-4003:
----------------------------------
Summary: Vertica and DB2 translators use incorrect push down of WEEK function (was: Vertica translator uses incorrect push down of WEEK function)
> Vertica and DB2 translators use incorrect push down of WEEK function
> --------------------------------------------------------------------
>
> Key: TEIID-4003
> URL: https://issues.jboss.org/browse/TEIID-4003
> Project: Teiid
> Issue Type: Bug
> Reporter: Andrej Šmigala
> Assignee: Steven Hawkins
> Fix For: 8.12.5
>
>
> TEIID-3282 changed the semantics of the WEEK function to use the iso behaviour.
> The Vertica database has WEEK_ISO function that returns the iso week, but the translator does not have that alias set.
> This results in the query (the datevalue in question is 2000-12-31)
> {code:sql}
> select week(datevalue) from source.largea where intkey = 365
> {code}
> to return 54, when the correct value is 52.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months
[JBoss JIRA] (TEIID-4003) Vertica translator uses incorrect push down of WEEK function
by Andrej Šmigala (JIRA)
[ https://issues.jboss.org/browse/TEIID-4003?page=com.atlassian.jira.plugin... ]
Andrej Šmigala commented on TEIID-4003:
---------------------------------------
Also noticed the same problem with the DB2 translator
> Vertica translator uses incorrect push down of WEEK function
> ------------------------------------------------------------
>
> Key: TEIID-4003
> URL: https://issues.jboss.org/browse/TEIID-4003
> Project: Teiid
> Issue Type: Bug
> Reporter: Andrej Šmigala
> Assignee: Steven Hawkins
> Fix For: 8.12.5
>
>
> TEIID-3282 changed the semantics of the WEEK function to use the iso behaviour.
> The Vertica database has WEEK_ISO function that returns the iso week, but the translator does not have that alias set.
> This results in the query (the datevalue in question is 2000-12-31)
> {code:sql}
> select week(datevalue) from source.largea where intkey = 365
> {code}
> to return 54, when the correct value is 52.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months
[JBoss JIRA] (TEIID-4003) Vertica translator uses incorrect push down of WEEK function
by Andrej Šmigala (JIRA)
Andrej Šmigala created TEIID-4003:
-------------------------------------
Summary: Vertica translator uses incorrect push down of WEEK function
Key: TEIID-4003
URL: https://issues.jboss.org/browse/TEIID-4003
Project: Teiid
Issue Type: Bug
Reporter: Andrej Šmigala
Assignee: Steven Hawkins
Fix For: 8.12.5
TEIID-3282 changed the semantics of the WEEK function to use the iso behaviour.
The Vertica database has WEEK_ISO function that returns the iso week, but the translator does not have that alias set.
This results in the query (the datevalue in question is 2000-12-31)
{code:sql}
select week(datevalue) from source.largea where intkey = 365
{code}
to return 54, when the correct value is 52.
--
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 Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3993?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-3993.
-----------------------------------
Fix Version/s: 9.0
8.12.5
8.13.2
Resolution: Done
The issue was we were not correcting all of the parent order bys when creating a view for the grouping in the first branch of the union, which lead to the incorrect output elements being assigned.
> 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
> Fix For: 9.0, 8.12.5, 8.13.2
>
> Attachments: teiid_debug.txt, teiid_stack.txt
>
>
> 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