[JBoss JIRA] (TEIID-5270) Materialization translator infinispan-hotrod inconsistent state
by Jan Stastny (JIRA)
[ https://issues.jboss.org/browse/TEIID-5270?page=com.atlassian.jira.plugin... ]
Jan Stastny commented on TEIID-5270:
------------------------------------
Here is a command log of the failure, notice that 'requestID=q/1D4wEip6wJ.4633 sourceCommandID=9' is started before a cache swap, but finished after it:
{code}
11:37:56,427 INFO [org.teiid.COMMAND_LOG] (New I/O worker #1) q/1D4wEip6wJ START USER COMMAND: startTime=2018-07-04 11:37:56.427 requestID=q/1D4wEip6wJ.4633 txID=null sessionID=q/1D4wEip6wJ applicationName=JDBC principal=user@teiid-security vdbName=teiid5270 vdbVersion=1 sql=SELECT COUNT(*) FROM mat_a
11:37:56,427 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue25269) YW7x9AHhoeye END SRC COMMAND: endTime=2018-07-04 11:37:56.427 requestID=YW7x9AHhoeye.0 sourceCommandID=130 executionID=9371 txID=null modelName=h2Source translatorName=h2 sessionID=YW7x9AHhoeye principal=embedded-async finalRowCount=1 cpuTime(ns)=520047
11:37:56,429 DEBUG [org.teiid.COMMAND_LOG] (Worker5_QueryProcessorQueue25272) YW7x9AHhoeye START DATA SRC COMMAND: startTime=2018-07-04 11:37:56.429 requestID=YW7x9AHhoeye.0 sourceCommandID=131 executionID=9373 txID=null modelName=h2Source translatorName=h2 sessionID=YW7x9AHhoeye principal=embedded-async sql=UPDATE h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE SET LoadNumber = 14, LoadState = 'LOADING', valid = TRUE, Updated = {ts'2018-07-04 11:37:56.428'}, Cardinality = 2 WHERE (VDBName = 'teiid5270') AND (VDBVersion = 1) AND (schemaName = 'View') AND (Name = 'mat_a') AND (loadNumber = 13)
11:37:56,429 DEBUG [org.teiid.COMMAND_LOG] (Worker5_QueryProcessorQueue25272) YW7x9AHhoeye SOURCE SRC COMMAND: endTime=2018-07-04 11:37:56.429 requestID=YW7x9AHhoeye.0 sourceCommandID=131 executionID=9373 txID=null modelName=h2Source translatorName=h2 sessionID=YW7x9AHhoeye principal=embedded-async sourceCommand=[UPDATE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" SET "LOADNUMBER" = 14, "LOADSTATE" = 'LOADING', "VALID" = 1, "UPDATED" = TIMESTAMP '2018-07-04 11:37:56.428', "CARDINALITY" = 2 WHERE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBNAME" = 'teiid5270' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBVERSION" = 1 AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."SCHEMANAME" = 'View' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."NAME" = 'mat_a' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."LOADNUMBER" = 13]
11:37:56,430 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue25273) YW7x9AHhoeye END SRC COMMAND: endTime=2018-07-04 11:37:56.43 requestID=YW7x9AHhoeye.0 sourceCommandID=131 executionID=9373 txID=null modelName=h2Source translatorName=h2 sessionID=YW7x9AHhoeye principal=embedded-async finalRowCount=1 cpuTime(ns)=610492
11:37:56,432 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue25273) YW7x9AHhoeye START DATA SRC COMMAND: startTime=2018-07-04 11:37:56.432 requestID=YW7x9AHhoeye.0 sourceCommandID=133 executionID=9374 txID=TransactionImple < ac, BasicAction: 0:ffff0a2805a3:429838a7:5b3ca351:20 status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=YW7x9AHhoeye principal=embedded-async sql=EXEC source.native('truncate source.a_stage')
11:37:56,433 DEBUG [org.teiid.COMMAND_LOG] (Worker4_QueryProcessorQueue25274) q/1D4wEip6wJ START DATA SRC COMMAND: startTime=2018-07-04 11:37:56.433 requestID=q/1D4wEip6wJ.4633 sourceCommandID=6 executionID=9372 txID=null modelName=h2Source translatorName=h2 sessionID=q/1D4wEip6wJ principal=user@teiid-security sql=SELECT g_0.VALID, g_0.LOADSTATE FROM h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE AS g_0 WHERE (g_0.VDBNAME = 'teiid5270') AND (g_0.VDBVERSION = 1) AND (g_0.SCHEMANAME = 'View') AND (g_0.NAME = 'mat_a')
11:37:56,433 DEBUG [org.teiid.COMMAND_LOG] (Worker4_QueryProcessorQueue25274) q/1D4wEip6wJ SOURCE SRC COMMAND: endTime=2018-07-04 11:37:56.433 requestID=q/1D4wEip6wJ.4633 sourceCommandID=6 executionID=9372 txID=null modelName=h2Source translatorName=h2 sessionID=q/1D4wEip6wJ principal=user@teiid-security sourceCommand=[SELECT g_0."VALID", g_0."LOADSTATE" FROM "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" AS g_0 WHERE g_0."VDBNAME" = 'teiid5270' AND g_0."VDBVERSION" = 1 AND g_0."SCHEMANAME" = 'View' AND g_0."NAME" = 'mat_a']
11:37:56,433 INFO [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue25270) q/1D4wEip6wJ END USER COMMAND: endTime=2018-07-04 11:37:56.433 requestID=q/1D4wEip6wJ.4632 txID=null sessionID=q/1D4wEip6wJ principal=user@teiid-security vdbName=teiid5270 vdbVersion=1 finalRowCount=1
11:37:56,434 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue25273) YW7x9AHhoeye END SRC COMMAND: endTime=2018-07-04 11:37:56.434 requestID=YW7x9AHhoeye.0 sourceCommandID=133 executionID=9374 txID=TransactionImple < ac, BasicAction: 0:ffff0a2805a3:429838a7:5b3ca351:20 status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=YW7x9AHhoeye principal=embedded-async finalRowCount=0 cpuTime(ns)=811973
11:37:56,435 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue25275) q/1D4wEip6wJ END SRC COMMAND: endTime=2018-07-04 11:37:56.435 requestID=q/1D4wEip6wJ.4633 sourceCommandID=6 executionID=9372 txID=null modelName=h2Source translatorName=h2 sessionID=q/1D4wEip6wJ principal=user@teiid-security finalRowCount=1 cpuTime(ns)=542408
11:37:56,435 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue25273) YW7x9AHhoeye START DATA SRC COMMAND: startTime=2018-07-04 11:37:56.435 requestID=YW7x9AHhoeye.0 sourceCommandID=134 executionID=9375 txID=TransactionImple < ac, BasicAction: 0:ffff0a2805a3:429838a7:5b3ca351:20 status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=YW7x9AHhoeye principal=embedded-async sql=INSERT INTO source.a_stage (id) VALUES (1)
11:37:56,435 DEBUG [org.teiid.COMMAND_LOG] (Worker4_QueryProcessorQueue25276) q/1D4wEip6wJ START DATA SRC COMMAND: startTime=2018-07-04 11:37:56.435 requestID=q/1D4wEip6wJ.4633 sourceCommandID=9 executionID=9376 txID=null modelName=source translatorName=tr-override sessionID=q/1D4wEip6wJ principal=user@teiid-security sql=SELECT g_0.id FROM source.a AS g_0
11:37:56,436 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue25273) YW7x9AHhoeye END SRC COMMAND: endTime=2018-07-04 11:37:56.436 requestID=YW7x9AHhoeye.0 sourceCommandID=134 executionID=9375 txID=TransactionImple < ac, BasicAction: 0:ffff0a2805a3:429838a7:5b3ca351:20 status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=YW7x9AHhoeye principal=embedded-async finalRowCount=1 cpuTime(ns)=594032
11:37:56,437 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue25273) YW7x9AHhoeye START DATA SRC COMMAND: startTime=2018-07-04 11:37:56.437 requestID=YW7x9AHhoeye.0 sourceCommandID=134 executionID=9377 txID=TransactionImple < ac, BasicAction: 0:ffff0a2805a3:429838a7:5b3ca351:20 status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=YW7x9AHhoeye principal=embedded-async sql=INSERT INTO source.a_stage (id) VALUES (2)
11:37:56,438 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue25273) YW7x9AHhoeye END SRC COMMAND: endTime=2018-07-04 11:37:56.438 requestID=YW7x9AHhoeye.0 sourceCommandID=134 executionID=9377 txID=TransactionImple < ac, BasicAction: 0:ffff0a2805a3:429838a7:5b3ca351:20 status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=YW7x9AHhoeye principal=embedded-async finalRowCount=1 cpuTime(ns)=560003
11:37:56,439 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue25273) YW7x9AHhoeye START DATA SRC COMMAND: startTime=2018-07-04 11:37:56.439 requestID=YW7x9AHhoeye.0 sourceCommandID=139 executionID=9378 txID=TransactionImple < ac, BasicAction: 0:ffff0a2805a3:429838a7:5b3ca351:20 status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=YW7x9AHhoeye principal=embedded-async sql=EXEC source.native('rename source.a_stage source.a')
11:37:56,441 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue25273) YW7x9AHhoeye END SRC COMMAND: endTime=2018-07-04 11:37:56.441 requestID=YW7x9AHhoeye.0 sourceCommandID=139 executionID=9378 txID=TransactionImple < ac, BasicAction: 0:ffff0a2805a3:429838a7:5b3ca351:20 status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=YW7x9AHhoeye principal=embedded-async finalRowCount=0 cpuTime(ns)=652588
11:37:56,442 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue25273) YW7x9AHhoeye START DATA SRC COMMAND: startTime=2018-07-04 11:37:56.442 requestID=YW7x9AHhoeye.0 sourceCommandID=140 executionID=9379 txID=TransactionImple < ac, BasicAction: 0:ffff0a2805a3:429838a7:5b3ca351:20 status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=YW7x9AHhoeye principal=embedded-async sql=UPDATE h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE SET LoadNumber = 14, LoadState = 'LOADED', valid = TRUE, Updated = {ts'2018-07-04 11:37:56.441'}, Cardinality = 2 WHERE (VDBName = 'teiid5270') AND (VDBVersion = 1) AND (schemaName = 'View') AND (Name = 'mat_a') AND (loadNumber = 14)
11:37:56,442 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue25273) YW7x9AHhoeye SOURCE SRC COMMAND: endTime=2018-07-04 11:37:56.442 requestID=YW7x9AHhoeye.0 sourceCommandID=140 executionID=9379 txID=TransactionImple < ac, BasicAction: 0:ffff0a2805a3:429838a7:5b3ca351:20 status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=YW7x9AHhoeye principal=embedded-async sourceCommand=[UPDATE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" SET "LOADNUMBER" = 14, "LOADSTATE" = 'LOADED', "VALID" = 1, "UPDATED" = TIMESTAMP '2018-07-04 11:37:56.441', "CARDINALITY" = ? WHERE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBNAME" = 'teiid5270' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBVERSION" = 1 AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."SCHEMANAME" = 'View' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."NAME" = 'mat_a' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."LOADNUMBER" = 14]
11:37:56,444 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue25273) YW7x9AHhoeye END SRC COMMAND: endTime=2018-07-04 11:37:56.444 requestID=YW7x9AHhoeye.0 sourceCommandID=140 executionID=9379 txID=TransactionImple < ac, BasicAction: 0:ffff0a2805a3:429838a7:5b3ca351:20 status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=YW7x9AHhoeye principal=embedded-async finalRowCount=1 cpuTime(ns)=803675
11:37:56,444 INFO [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue25273) YW7x9AHhoeye END USER COMMAND: endTime=2018-07-04 11:37:56.444 requestID=YW7x9AHhoeye.0 txID=null sessionID=YW7x9AHhoeye principal=embedded-async vdbName=teiid5270 vdbVersion=1 finalRowCount=1
11:37:56,449 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue25277) q/1D4wEip6wJ END SRC COMMAND: endTime=2018-07-04 11:37:56.449 requestID=q/1D4wEip6wJ.4633 sourceCommandID=9 executionID=9376 txID=null modelName=source translatorName=tr-override sessionID=q/1D4wEip6wJ principal=user@teiid-security finalRowCount=0 cpuTime(ns)=650502
11:37:56,621 INFO [org.teiid.COMMAND_LOG] (MSC service thread 1-4) CANCEL USER COMMAND: endTime=2018-07-04 11:37:56.621 requestID=q/1D4wEip6wJ.4633 txID=null sessionID=null principal=null vdbName=null vdbVersion=0 finalRowCount=null
{code}
> Materialization translator infinispan-hotrod inconsistent state
> ---------------------------------------------------------------
>
> Key: TEIID-5270
> URL: https://issues.jboss.org/browse/TEIID-5270
> Project: Teiid
> Issue Type: Bug
> Components: JDG Connector, Misc. Connectors
> Affects Versions: 8.12.12.6_4
> Reporter: Jan Stastny
> Assignee: Van Halbert
> Priority: Critical
> Fix For: 8.12.14.6_4, 11.1
>
>
> There is an inconsistency between contents of status table and jdg cache when using infinispan-hotrod translator for materialization.
> For a vdb:
> {code:xml}
> <vdb name="teiid5259" version="1">
> <model name="source">
> <source connection-jndi-name="java:/jdg71HotrodDS" name="source"
> translator-name="tr-override" />
> <metadata type="DDL">
> <![CDATA[
> CREATE FOREIGN TABLE a(id integer NOT NULL PRIMARY KEY) OPTIONS (UPDATABLE TRUE, "teiid_ispn:cache" '${primary.cache.name}');
> CREATE FOREIGN TABLE a_stage(id integer NOT NULL PRIMARY KEY) OPTIONS (UPDATABLE TRUE, "teiid_ispn:cache" '${staging.cache.name}');
> ]]>
> </metadata>
> <metadata type="NATIVE" />
> </model>
> <model name="h2Source">
> <source name="h2Source" translator-name="h2" connection-jndi-name="java:/h2-localhost-9292-ds" />
> </model>
> <model name="View" type="VIRTUAL">
> <metadata type="DDL"><![CDATA[
> CREATE VIEW mat_a(
> id integer NOT NULL
> ) OPTIONS (MATERIALIZED 'TRUE',
> MATERIALIZED_TABLE 'source.a',
> "teiid_rel:MATERIALIZED_STAGE_TABLE" 'source.a_stage',
> "teiid_rel:ALLOW_MATVIEW_MANAGEMENT" 'true',
> "teiid_rel:MATVIEW_STATUS_TABLE" 'h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE',
> "teiid_rel:MATVIEW_AFTER_LOAD_SCRIPT" 'execute source.native(''rename source.a_stage source.a'');',
> "teiid_rel:MATVIEW_BEFORE_LOAD_SCRIPT" 'execute source.native(''truncate source.a_stage'');',
> "teiid_rel:MATVIEW_ONERROR_ACTION" 'THROW_EXCEPTION',
> "teiid_rel:MATVIEW_TTL" 10000
> )
> AS SELECT 1 UNION ALL SELECT 2;
> ]]>
> </metadata>
> </model>
> <translator name="tr-override" type="infinispan-hotrod">
> <property name="SupportsDirectQueryProcedure" value="true"/>
> </translator>
> </vdb>
> {code}
> I can reach a state when:
> # The status table states LOADED for the view
> # The DATA SRC commands inserting into JDG ended (according to teiid-command log)
> # But consecutive query against the view returns lower count (even though having THROW_EXCEPTION in ONERROR_ACTION property)
> See the attached command log:
> {code}
> 13:59:31,679 INFO [org.teiid.COMMAND_LOG] (Teiid Timer0) L8MeUp92Tess START USER COMMAND: startTime=2018-03-01 13:59:31.679 requestID=L8MeUp92Tess.0 txID=null sessionID=L8MeUp92Tess applicationName=internal principal=embedded-async vdbName=teiid5259 vdbVersion=1 sql=execute SYSADMIN.loadMatView('View','mat_a')
> 13:59:31,680 INFO [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue14) SBqGYWW07OB5 END USER COMMAND: endTime=2018-03-01 13:59:31.68 requestID=SBqGYWW07OB5.0 txID=null sessionID=SBqGYWW07OB5 principal=embedded-async vdbName=teiid5259 vdbVersion=1 finalRowCount=1
> 13:59:31,715 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue16) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:31.715 requestID=L8MeUp92Tess.0 sourceCommandID=70 executionID=8 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sql=SELECT g_0.NAME, g_0.TARGETSCHEMANAME, g_0.TARGETNAME, g_0.VALID, g_0.LOADSTATE, g_0.UPDATED, g_0.CARDINALITY, g_0.LOADNUMBER FROM h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE AS g_0 WHERE (g_0.VDBNAME = 'teiid5259') AND (g_0.VDBVERSION = 1) AND (g_0.SCHEMANAME = 'View') AND (g_0.NAME = 'mat_a')
> 13:59:31,715 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue16) L8MeUp92Tess SOURCE SRC COMMAND: endTime=2018-03-01 13:59:31.715 requestID=L8MeUp92Tess.0 sourceCommandID=70 executionID=8 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sourceCommand=[SELECT g_0."NAME", g_0."TARGETSCHEMANAME", g_0."TARGETNAME", g_0."VALID", g_0."LOADSTATE", g_0."UPDATED", g_0."CARDINALITY", g_0."LOADNUMBER" FROM "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" AS g_0 WHERE g_0."VDBNAME" = 'teiid5259' AND g_0."VDBVERSION" = 1 AND g_0."SCHEMANAME" = 'View' AND g_0."NAME" = 'mat_a']
> 13:59:31,716 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue17) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:31.716 requestID=L8MeUp92Tess.0 sourceCommandID=70 executionID=8 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=1071137
> 13:59:31,725 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue18) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:31.725 requestID=L8MeUp92Tess.0 sourceCommandID=71 executionID=9 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sql=UPDATE h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE SET LoadNumber = 2, LoadState = 'LOADING', valid = FALSE, Updated = {ts'2018-03-01 13:59:31.719'}, Cardinality = -1 WHERE (VDBName = 'teiid5259') AND (VDBVersion = 1) AND (schemaName = 'View') AND (Name = 'mat_a') AND (loadNumber = 1)
> 13:59:31,725 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue18) L8MeUp92Tess SOURCE SRC COMMAND: endTime=2018-03-01 13:59:31.725 requestID=L8MeUp92Tess.0 sourceCommandID=71 executionID=9 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sourceCommand=[UPDATE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" SET "LOADNUMBER" = 2, "LOADSTATE" = 'LOADING', "VALID" = 0, "UPDATED" = TIMESTAMP '2018-03-01 13:59:31.719', "CARDINALITY" = -1 WHERE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBNAME" = 'teiid5259' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBVERSION" = 1 AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."SCHEMANAME" = 'View' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."NAME" = 'mat_a' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."LOADNUMBER" = 1]
> 13:59:31,728 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:31.728 requestID=L8MeUp92Tess.0 sourceCommandID=71 executionID=9 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=1169356
> 13:59:31,731 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:31.731 requestID=L8MeUp92Tess.0 sourceCommandID=73 executionID=10 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async sql=EXEC source.native('truncate source.a_stage')
> 13:59:31,845 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 END SRC COMMAND: endTime=2018-03-01 13:59:31.845 requestID=uaySHcXyc0o5.0 sourceCommandID=74 executionID=6 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=uaySHcXyc0o5 principal=embedded-async finalRowCount=1 cpuTime(ns)=3558736
> 13:59:31,847 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 START DATA SRC COMMAND: startTime=2018-03-01 13:59:31.847 requestID=uaySHcXyc0o5.0 sourceCommandID=79 executionID=11 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=uaySHcXyc0o5 principal=embedded-async sql=EXEC source.native('rename source.a_stage source.a')
> 13:59:32,040 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:32.04 requestID=L8MeUp92Tess.0 sourceCommandID=73 executionID=10 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=0 cpuTime(ns)=1493046
> 13:59:32,047 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:32.047 requestID=L8MeUp92Tess.0 sourceCommandID=74 executionID=12 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async sql=INSERT INTO source.a_stage (id) VALUES (1)
> 13:59:32,460 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:32.46 requestID=L8MeUp92Tess.0 sourceCommandID=74 executionID=12 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=4783162
> 13:59:32,462 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:32.462 requestID=L8MeUp92Tess.0 sourceCommandID=74 executionID=13 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async sql=INSERT INTO source.a_stage (id) VALUES (2)
> 13:59:32,753 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 END SRC COMMAND: endTime=2018-03-01 13:59:32.753 requestID=uaySHcXyc0o5.0 sourceCommandID=79 executionID=11 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=uaySHcXyc0o5 principal=embedded-async finalRowCount=0 cpuTime(ns)=5021072
> 13:59:32,800 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 START DATA SRC COMMAND: startTime=2018-03-01 13:59:32.8 requestID=uaySHcXyc0o5.0 sourceCommandID=80 executionID=14 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=uaySHcXyc0o5 principal=embedded-async sql=UPDATE h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE SET LoadNumber = 1, LoadState = 'LOADED', valid = TRUE, Updated = {ts'2018-03-01 13:59:32.756'}, Cardinality = 2 WHERE (VDBName = 'teiid5259') AND (VDBVersion = 1) AND (schemaName = 'View') AND (Name = 'mat_a') AND (loadNumber = 1)
> 13:59:32,801 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 SOURCE SRC COMMAND: endTime=2018-03-01 13:59:32.801 requestID=uaySHcXyc0o5.0 sourceCommandID=80 executionID=14 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=uaySHcXyc0o5 principal=embedded-async sourceCommand=[UPDATE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" SET "LOADNUMBER" = 1, "LOADSTATE" = 'LOADED', "VALID" = 1, "UPDATED" = TIMESTAMP '2018-03-01 13:59:32.756', "CARDINALITY" = ? WHERE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBNAME" = 'teiid5259' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBVERSION" = 1 AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."SCHEMANAME" = 'View' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."NAME" = 'mat_a' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."LOADNUMBER" = 1]
> 13:59:32,804 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 END SRC COMMAND: endTime=2018-03-01 13:59:32.804 requestID=uaySHcXyc0o5.0 sourceCommandID=80 executionID=14 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=uaySHcXyc0o5 principal=embedded-async finalRowCount=1 cpuTime(ns)=31050942
> 13:59:32,806 INFO [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 END USER COMMAND: endTime=2018-03-01 13:59:32.806 requestID=uaySHcXyc0o5.0 txID=null sessionID=uaySHcXyc0o5 principal=embedded-async vdbName=teiid5259 vdbVersion=1 finalRowCount=1
> 13:59:33,005 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:33.005 requestID=L8MeUp92Tess.0 sourceCommandID=74 executionID=13 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=4943881
> 13:59:33,014 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:33.014 requestID=L8MeUp92Tess.0 sourceCommandID=79 executionID=15 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async sql=EXEC source.native('rename source.a_stage source.a')
> 13:59:33,723 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:33.723 requestID=L8MeUp92Tess.0 sourceCommandID=79 executionID=15 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=0 cpuTime(ns)=4426814
> 13:59:33,731 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue20) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:33.731 requestID=L8MeUp92Tess.0 sourceCommandID=80 executionID=16 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sql=UPDATE h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE SET LoadNumber = 2, LoadState = 'LOADED', valid = TRUE, Updated = {ts'2018-03-01 13:59:33.725'}, Cardinality = 2 WHERE (VDBName = 'teiid5259') AND (VDBVersion = 1) AND (schemaName = 'View') AND (Name = 'mat_a') AND (loadNumber = 2)
> 13:59:33,732 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue20) L8MeUp92Tess SOURCE SRC COMMAND: endTime=2018-03-01 13:59:33.732 requestID=L8MeUp92Tess.0 sourceCommandID=80 executionID=16 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sourceCommand=[UPDATE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" SET "LOADNUMBER" = 2, "LOADSTATE" = 'LOADED', "VALID" = 1, "UPDATED" = TIMESTAMP '2018-03-01 13:59:33.725', "CARDINALITY" = ? WHERE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBNAME" = 'teiid5259' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBVERSION" = 1 AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."SCHEMANAME" = 'View' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."NAME" = 'mat_a' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."LOADNUMBER" = 2]
> 13:59:33,737 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue20) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:33.737 requestID=L8MeUp92Tess.0 sourceCommandID=80 executionID=16 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=3747146
> 13:59:33,740 INFO [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue20) L8MeUp92Tess END USER COMMAND: endTime=2018-03-01 13:59:33.74 requestID=L8MeUp92Tess.0 txID=null sessionID=L8MeUp92Tess principal=embedded-async vdbName=teiid5259 vdbVersion=1 finalRowCount=1
> 13:59:35,871 INFO [org.teiid.COMMAND_LOG] (New I/O worker #2) eP8bDNkHEpSG START USER COMMAND: startTime=2018-03-01 13:59:35.871 requestID=eP8bDNkHEpSG.0 txID=null sessionID=eP8bDNkHEpSG applicationName=JDBC principal=user@teiid-security vdbName=teiid5259 vdbVersion=1 sql=SELECT COUNT(*) FROM mat_a
> 13:59:35,877 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue22) eP8bDNkHEpSG START DATA SRC COMMAND: startTime=2018-03-01 13:59:35.877 requestID=eP8bDNkHEpSG.0 sourceCommandID=6 executionID=17 txID=null modelName=h2Source translatorName=h2 sessionID=eP8bDNkHEpSG principal=user@teiid-security sql=SELECT g_0.VALID, g_0.LOADSTATE FROM h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE AS g_0 WHERE (g_0.VDBNAME = 'teiid5259') AND (g_0.VDBVERSION = 1) AND (g_0.SCHEMANAME = 'View') AND (g_0.NAME = 'mat_a')
> 13:59:35,877 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue22) eP8bDNkHEpSG SOURCE SRC COMMAND: endTime=2018-03-01 13:59:35.877 requestID=eP8bDNkHEpSG.0 sourceCommandID=6 executionID=17 txID=null modelName=h2Source translatorName=h2 sessionID=eP8bDNkHEpSG principal=user@teiid-security sourceCommand=[SELECT g_0."VALID", g_0."LOADSTATE" FROM "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" AS g_0 WHERE g_0."VDBNAME" = 'teiid5259' AND g_0."VDBVERSION" = 1 AND g_0."SCHEMANAME" = 'View' AND g_0."NAME" = 'mat_a']
> 13:59:35,878 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue23) eP8bDNkHEpSG END SRC COMMAND: endTime=2018-03-01 13:59:35.878 requestID=eP8bDNkHEpSG.0 sourceCommandID=6 executionID=17 txID=null modelName=h2Source translatorName=h2 sessionID=eP8bDNkHEpSG principal=user@teiid-security finalRowCount=1 cpuTime(ns)=904441
> 13:59:35,879 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue24) eP8bDNkHEpSG START DATA SRC COMMAND: startTime=2018-03-01 13:59:35.879 requestID=eP8bDNkHEpSG.0 sourceCommandID=9 executionID=18 txID=null modelName=source translatorName=tr-override sessionID=eP8bDNkHEpSG principal=user@teiid-security sql=SELECT g_0.id FROM source.a AS g_0
> 13:59:36,326 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue25) eP8bDNkHEpSG END SRC COMMAND: endTime=2018-03-01 13:59:36.326 requestID=eP8bDNkHEpSG.0 sourceCommandID=9 executionID=18 txID=null modelName=source translatorName=tr-override sessionID=eP8bDNkHEpSG principal=user@teiid-security finalRowCount=1 cpuTime(ns)=32679662
> 13:59:36,384 INFO [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue26) eP8bDNkHEpSG END USER COMMAND: endTime=2018-03-01 13:59:36.384 requestID=eP8bDNkHEpSG.0 txID=null sessionID=eP8bDNkHEpSG principal=user@teiid-security vdbName=teiid5259 vdbVersion=1 finalRowCount=1
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 5 months
[JBoss JIRA] (TEIID-5408) Complex Inline View queries fail with IndexOutOfBoundsException
by Ivan Semenov (JIRA)
[ https://issues.jboss.org/browse/TEIID-5408?page=com.atlassian.jira.plugin... ]
Ivan Semenov commented on TEIID-5408:
-------------------------------------
For the given SQL the issue is reproducible only if translator supports InlineViews .
InlineViews property affects location of Access node in the plan hierarchy.
See below where Access is placed by RaiseAccess rule execution with a translator supporting inline views:
{noformat}
BEFORE RaiseAccess
Project(groups=[w], props={PROJECT_COLS=[timestampdiff(SQL_TSI_HOUR, w.ObsoleteDate, w.storn) AS diff, CASE WHEN (w.UnitMeasureCode = 'platnosci') OR (w.UnitMeasureCode LIKE '%PayU - szybkie%') THEN 'PAYU' ELSE '' END AS payu, CASE WHEN w.UnitMeasureCode IN ('moneyorder', 'Przelew bankowy') THEN 'przelew' ELSE '' END AS przelew], OUTPUT_COLS=null})
Source(groups=[w], props={NESTED_COMMAND=SELECT anon_grp0.gcol0 AS ObsoleteDate, anon_grp0.gcol1 AS UnitMeasureCode, anon_grp0.agg0 AS storn FROM nw.billofmaterials GROUP BY nw.billofmaterials.ObsoleteDate, nw.billofmaterials.UnitMeasureCode, SYMBOL_MAP={w.ObsoleteDate=anon_grp0.gcol0, w.storn=anon_grp0.agg0, w.UnitMeasureCode=anon_grp0.gcol1}, OUTPUT_COLS=null})
Project(groups=[anon_grp0], props={PROJECT_COLS=[anon_grp0.gcol0 AS ObsoleteDate, anon_grp0.agg0 AS storn, anon_grp0.gcol1 AS UnitMeasureCode], OUTPUT_COLS=null})
Group(groups=[nw.billofmaterials, anon_grp0], props={GROUP_COLS=[nw.billofmaterials.ObsoleteDate, nw.billofmaterials.UnitMeasureCode], SYMBOL_MAP={anon_grp0.gcol0=nw.billofmaterials.ObsoleteDate, anon_grp0.gcol1=nw.billofmaterials.UnitMeasureCode, anon_grp0.agg0=MIN(nw.billofmaterials.ModifiedDate)}, OUTPUT_COLS=null})
Access(groups=[nw.billofmaterials], props={SOURCE_HINT=null, MODEL_ID=Schema name=nw, nameInSource=null, uuid=tid:d0a40034fb62, OUTPUT_COLS=null})
Source(groups=[nw.billofmaterials], props={OUTPUT_COLS=null})
AFTER RaiseAccess
Project(groups=[w], props={PROJECT_COLS=[timestampdiff(SQL_TSI_HOUR, w.ObsoleteDate, w.storn) AS diff, CASE WHEN (w.UnitMeasureCode = 'platnosci') OR (w.UnitMeasureCode LIKE '%PayU - szybkie%') THEN 'PAYU' ELSE '' END AS payu, CASE WHEN w.UnitMeasureCode IN ('moneyorder', 'Przelew bankowy') THEN 'przelew' ELSE '' END AS przelew], OUTPUT_COLS=null})
Access(groups=[w], props={SOURCE_HINT=null, MODEL_ID=Schema name=nw, nameInSource=null, uuid=tid:d0a40034fb62, OUTPUT_COLS=null})
Source(groups=[w], props={NESTED_COMMAND=SELECT anon_grp0.gcol0 AS ObsoleteDate, anon_grp0.gcol1 AS UnitMeasureCode, anon_grp0.agg0 AS storn FROM nw.billofmaterials GROUP BY nw.billofmaterials.ObsoleteDate, nw.billofmaterials.UnitMeasureCode, SYMBOL_MAP={w.ObsoleteDate=anon_grp0.gcol0, w.storn=anon_grp0.agg0, w.UnitMeasureCode=anon_grp0.gcol1}, OUTPUT_COLS=null, INLINE_VIEW=true})
Project(groups=[anon_grp0], props={PROJECT_COLS=[anon_grp0.gcol0 AS ObsoleteDate, anon_grp0.agg0 AS storn, anon_grp0.gcol1 AS UnitMeasureCode], OUTPUT_COLS=null})
Group(groups=[nw.billofmaterials, anon_grp0], props={GROUP_COLS=[nw.billofmaterials.ObsoleteDate, nw.billofmaterials.UnitMeasureCode], SYMBOL_MAP={anon_grp0.gcol0=nw.billofmaterials.ObsoleteDate, anon_grp0.gcol1=nw.billofmaterials.UnitMeasureCode, anon_grp0.agg0=MIN(nw.billofmaterials.ModifiedDate)}, OUTPUT_COLS=null})
Source(groups=[nw.billofmaterials], props={OUTPUT_COLS=null})
{noformat}
and this is where Access node is placed when translator doesn't support InlineViews
{noformat}
BEFORE RaiseAccess
Project(groups=[w], props={PROJECT_COLS=[timestampdiff(SQL_TSI_HOUR, w.ObsoleteDate, w.storn) AS diff, CASE WHEN (w.UnitMeasureCode = 'platnosci') OR (w.UnitMeasureCode LIKE '%PayU - szybkie%') THEN 'PAYU' ELSE '' END AS payu, CASE WHEN w.UnitMeasureCode IN ('moneyorder', 'Przelew bankowy') THEN 'przelew' ELSE '' END AS przelew], OUTPUT_COLS=null})
Source(groups=[w], props={NESTED_COMMAND=SELECT anon_grp0.gcol0 AS ObsoleteDate, anon_grp0.gcol1 AS UnitMeasureCode, anon_grp0.agg0 AS storn FROM nw.billofmaterials GROUP BY nw.billofmaterials.ObsoleteDate, nw.billofmaterials.UnitMeasureCode, SYMBOL_MAP={w.ObsoleteDate=anon_grp0.gcol0, w.storn=anon_grp0.agg0, w.UnitMeasureCode=anon_grp0.gcol1}, OUTPUT_COLS=null})
Project(groups=[anon_grp0], props={PROJECT_COLS=[anon_grp0.gcol0 AS ObsoleteDate, anon_grp0.agg0 AS storn, anon_grp0.gcol1 AS UnitMeasureCode], OUTPUT_COLS=null})
Group(groups=[nw.billofmaterials, anon_grp0], props={GROUP_COLS=[nw.billofmaterials.ObsoleteDate, nw.billofmaterials.UnitMeasureCode], SYMBOL_MAP={anon_grp0.gcol0=nw.billofmaterials.ObsoleteDate, anon_grp0.gcol1=nw.billofmaterials.UnitMeasureCode, anon_grp0.agg0=MIN(nw.billofmaterials.ModifiedDate)}, OUTPUT_COLS=null})
Access(groups=[nw.billofmaterials], props={SOURCE_HINT=null, MODEL_ID=Schema name=nw, nameInSource=null, uuid=tid:d0a40034fb62, OUTPUT_COLS=null})
Source(groups=[nw.billofmaterials], props={OUTPUT_COLS=null})
AFTER RaiseAccess
Project(groups=[w], props={PROJECT_COLS=[timestampdiff(SQL_TSI_HOUR, w.ObsoleteDate, w.storn) AS diff, CASE WHEN (w.UnitMeasureCode = 'platnosci') OR (w.UnitMeasureCode LIKE '%PayU - szybkie%') THEN 'PAYU' ELSE '' END AS payu, CASE WHEN w.UnitMeasureCode IN ('moneyorder', 'Przelew bankowy') THEN 'przelew' ELSE '' END AS przelew], OUTPUT_COLS=null})
Source(groups=[w], props={NESTED_COMMAND=SELECT anon_grp0.gcol0 AS ObsoleteDate, anon_grp0.gcol1 AS UnitMeasureCode, anon_grp0.agg0 AS storn FROM nw.billofmaterials GROUP BY nw.billofmaterials.ObsoleteDate, nw.billofmaterials.UnitMeasureCode, SYMBOL_MAP={w.ObsoleteDate=anon_grp0.gcol0, w.storn=anon_grp0.agg0, w.UnitMeasureCode=anon_grp0.gcol1}, OUTPUT_COLS=null})
Access(groups=[nw.billofmaterials, anon_grp0], props={SOURCE_HINT=null, MODEL_ID=Schema name=nw, nameInSource=null, uuid=tid:d0a40034fb62, OUTPUT_COLS=null})
Project(groups=[anon_grp0], props={PROJECT_COLS=[anon_grp0.gcol0 AS ObsoleteDate, anon_grp0.agg0 AS storn, anon_grp0.gcol1 AS UnitMeasureCode], OUTPUT_COLS=null})
Group(groups=[nw.billofmaterials, anon_grp0], props={GROUP_COLS=[nw.billofmaterials.ObsoleteDate, nw.billofmaterials.UnitMeasureCode], SYMBOL_MAP={anon_grp0.gcol0=nw.billofmaterials.ObsoleteDate, anon_grp0.gcol1=nw.billofmaterials.UnitMeasureCode, anon_grp0.agg0=MIN(nw.billofmaterials.ModifiedDate)}, OUTPUT_COLS=null})
Source(groups=[nw.billofmaterials], props={OUTPUT_COLS=null})
{noformat}
Position of nodes in plan affect flow in method {{RuleAssignOutputElements#collectRequiredInputSymbols}} and {{RuleAssignOutputElements#pushProjection}} (note {{requiredSymbols.add(ss)}} invocation)
> Complex Inline View queries fail with IndexOutOfBoundsException
> ---------------------------------------------------------------
>
> Key: TEIID-5408
> URL: https://issues.jboss.org/browse/TEIID-5408
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 10.2.1
> Environment: teiid-10.2.1 on WildFly Full 11.0.0.Final (WildFly Core 3.0.8.Final)
> Reporter: Ivan Semenov
> Assignee: Steven Hawkins
>
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 5 months
[JBoss JIRA] (TEIID-5372) Enhance docker support
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5372?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-5372:
----------------------------------
Git Pull Request: https://github.com/jboss-dockerfiles/teiid/pull/5
Added a pull request to update the jboss/teiid image. That could be updated as part of the build if we want.
That just leaves updating the example.
> Enhance docker support
> ----------------------
>
> Key: TEIID-5372
> URL: https://issues.jboss.org/browse/TEIID-5372
> Project: Teiid
> Issue Type: Enhancement
> Reporter: Rafal Korytkowski
> Assignee: Rafal Korytkowski
> Priority: Optional
>
> Currently there's limited support for docker in Teiid, which can be enabled by adding -Ddocker=true to the build command. The generated image is based on CentOS and running standalone on the Wildfly server. Latest builds are pushed to https://hub.docker.com/r/jboss/teiid/, but versions are not tagged automatically with releases. Development with Docker is not supported.
> Proposed changes:
> 1. Produce docker image based on Alpine, which is better suited for microservices, in addition to CentOS.
> 2. Automatically tag versions in Docker when doing releases.
> 3. Support development by providing a docker-compose file with the possibility to start server in a debug mode and enabled auto-redeployment of code changes.
> 4. Optionally provide a Docker image for building code using maven in Docker. Having Docker as the only prerequisite is convenient for CI environments and makes the build environment agnostic.
> [~shawkins], [~rareddy], thoughts?
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 5 months
[JBoss JIRA] (TEIID-5404) JPA Translator fails embeddeds
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5404?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-5404:
----------------------------------
Fix Version/s: 11.0.1
10.3.3
> JPA Translator fails embeddeds
> ------------------------------
>
> Key: TEIID-5404
> URL: https://issues.jboss.org/browse/TEIID-5404
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Reporter: Harold Campbell
> Assignee: Steven Hawkins
> Fix For: 11.1, 11.0.1, 10.3.3
>
>
> The JPA translator does not properly handle embedded properties. Columns can overlap if the embedded has properties sharing the same name as the parent or other embedded properties. Come query time, embedded columns do not get translated into correct entity path traversals.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 5 months
[JBoss JIRA] (TEIID-5407) Remove teiid community docker build
by Steven Hawkins (JIRA)
Steven Hawkins created TEIID-5407:
-------------------------------------
Summary: Remove teiid community docker build
Key: TEIID-5407
URL: https://issues.jboss.org/browse/TEIID-5407
Project: Teiid
Issue Type: Sub-task
Components: Build/Kits
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 11.1
After some debate we've agreed to remove the teiid community docker image as we are not promoting its use.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 5 months
[JBoss JIRA] (TEIID-5270) Materialization translator infinispan-hotrod inconsistent state
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-5270?page=com.atlassian.jira.plugin... ]
Van Halbert commented on TEIID-5270:
------------------------------------
If #5 is true and 'a' is still accessed, then something is holding onto the "a" reference. Because the mapcache is what (or should) controls which JDG cache that is actually used upon query execution. And the swap of mappings has taken place because 'a' is now getting loaded. hm.
> Materialization translator infinispan-hotrod inconsistent state
> ---------------------------------------------------------------
>
> Key: TEIID-5270
> URL: https://issues.jboss.org/browse/TEIID-5270
> Project: Teiid
> Issue Type: Bug
> Components: JDG Connector, Misc. Connectors
> Affects Versions: 8.12.12.6_4
> Reporter: Jan Stastny
> Assignee: Van Halbert
> Priority: Critical
> Fix For: 8.12.14.6_4, 11.1
>
>
> There is an inconsistency between contents of status table and jdg cache when using infinispan-hotrod translator for materialization.
> For a vdb:
> {code:xml}
> <vdb name="teiid5259" version="1">
> <model name="source">
> <source connection-jndi-name="java:/jdg71HotrodDS" name="source"
> translator-name="tr-override" />
> <metadata type="DDL">
> <![CDATA[
> CREATE FOREIGN TABLE a(id integer NOT NULL PRIMARY KEY) OPTIONS (UPDATABLE TRUE, "teiid_ispn:cache" '${primary.cache.name}');
> CREATE FOREIGN TABLE a_stage(id integer NOT NULL PRIMARY KEY) OPTIONS (UPDATABLE TRUE, "teiid_ispn:cache" '${staging.cache.name}');
> ]]>
> </metadata>
> <metadata type="NATIVE" />
> </model>
> <model name="h2Source">
> <source name="h2Source" translator-name="h2" connection-jndi-name="java:/h2-localhost-9292-ds" />
> </model>
> <model name="View" type="VIRTUAL">
> <metadata type="DDL"><![CDATA[
> CREATE VIEW mat_a(
> id integer NOT NULL
> ) OPTIONS (MATERIALIZED 'TRUE',
> MATERIALIZED_TABLE 'source.a',
> "teiid_rel:MATERIALIZED_STAGE_TABLE" 'source.a_stage',
> "teiid_rel:ALLOW_MATVIEW_MANAGEMENT" 'true',
> "teiid_rel:MATVIEW_STATUS_TABLE" 'h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE',
> "teiid_rel:MATVIEW_AFTER_LOAD_SCRIPT" 'execute source.native(''rename source.a_stage source.a'');',
> "teiid_rel:MATVIEW_BEFORE_LOAD_SCRIPT" 'execute source.native(''truncate source.a_stage'');',
> "teiid_rel:MATVIEW_ONERROR_ACTION" 'THROW_EXCEPTION',
> "teiid_rel:MATVIEW_TTL" 10000
> )
> AS SELECT 1 UNION ALL SELECT 2;
> ]]>
> </metadata>
> </model>
> <translator name="tr-override" type="infinispan-hotrod">
> <property name="SupportsDirectQueryProcedure" value="true"/>
> </translator>
> </vdb>
> {code}
> I can reach a state when:
> # The status table states LOADED for the view
> # The DATA SRC commands inserting into JDG ended (according to teiid-command log)
> # But consecutive query against the view returns lower count (even though having THROW_EXCEPTION in ONERROR_ACTION property)
> See the attached command log:
> {code}
> 13:59:31,679 INFO [org.teiid.COMMAND_LOG] (Teiid Timer0) L8MeUp92Tess START USER COMMAND: startTime=2018-03-01 13:59:31.679 requestID=L8MeUp92Tess.0 txID=null sessionID=L8MeUp92Tess applicationName=internal principal=embedded-async vdbName=teiid5259 vdbVersion=1 sql=execute SYSADMIN.loadMatView('View','mat_a')
> 13:59:31,680 INFO [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue14) SBqGYWW07OB5 END USER COMMAND: endTime=2018-03-01 13:59:31.68 requestID=SBqGYWW07OB5.0 txID=null sessionID=SBqGYWW07OB5 principal=embedded-async vdbName=teiid5259 vdbVersion=1 finalRowCount=1
> 13:59:31,715 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue16) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:31.715 requestID=L8MeUp92Tess.0 sourceCommandID=70 executionID=8 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sql=SELECT g_0.NAME, g_0.TARGETSCHEMANAME, g_0.TARGETNAME, g_0.VALID, g_0.LOADSTATE, g_0.UPDATED, g_0.CARDINALITY, g_0.LOADNUMBER FROM h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE AS g_0 WHERE (g_0.VDBNAME = 'teiid5259') AND (g_0.VDBVERSION = 1) AND (g_0.SCHEMANAME = 'View') AND (g_0.NAME = 'mat_a')
> 13:59:31,715 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue16) L8MeUp92Tess SOURCE SRC COMMAND: endTime=2018-03-01 13:59:31.715 requestID=L8MeUp92Tess.0 sourceCommandID=70 executionID=8 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sourceCommand=[SELECT g_0."NAME", g_0."TARGETSCHEMANAME", g_0."TARGETNAME", g_0."VALID", g_0."LOADSTATE", g_0."UPDATED", g_0."CARDINALITY", g_0."LOADNUMBER" FROM "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" AS g_0 WHERE g_0."VDBNAME" = 'teiid5259' AND g_0."VDBVERSION" = 1 AND g_0."SCHEMANAME" = 'View' AND g_0."NAME" = 'mat_a']
> 13:59:31,716 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue17) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:31.716 requestID=L8MeUp92Tess.0 sourceCommandID=70 executionID=8 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=1071137
> 13:59:31,725 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue18) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:31.725 requestID=L8MeUp92Tess.0 sourceCommandID=71 executionID=9 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sql=UPDATE h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE SET LoadNumber = 2, LoadState = 'LOADING', valid = FALSE, Updated = {ts'2018-03-01 13:59:31.719'}, Cardinality = -1 WHERE (VDBName = 'teiid5259') AND (VDBVersion = 1) AND (schemaName = 'View') AND (Name = 'mat_a') AND (loadNumber = 1)
> 13:59:31,725 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue18) L8MeUp92Tess SOURCE SRC COMMAND: endTime=2018-03-01 13:59:31.725 requestID=L8MeUp92Tess.0 sourceCommandID=71 executionID=9 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sourceCommand=[UPDATE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" SET "LOADNUMBER" = 2, "LOADSTATE" = 'LOADING', "VALID" = 0, "UPDATED" = TIMESTAMP '2018-03-01 13:59:31.719', "CARDINALITY" = -1 WHERE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBNAME" = 'teiid5259' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBVERSION" = 1 AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."SCHEMANAME" = 'View' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."NAME" = 'mat_a' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."LOADNUMBER" = 1]
> 13:59:31,728 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:31.728 requestID=L8MeUp92Tess.0 sourceCommandID=71 executionID=9 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=1169356
> 13:59:31,731 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:31.731 requestID=L8MeUp92Tess.0 sourceCommandID=73 executionID=10 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async sql=EXEC source.native('truncate source.a_stage')
> 13:59:31,845 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 END SRC COMMAND: endTime=2018-03-01 13:59:31.845 requestID=uaySHcXyc0o5.0 sourceCommandID=74 executionID=6 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=uaySHcXyc0o5 principal=embedded-async finalRowCount=1 cpuTime(ns)=3558736
> 13:59:31,847 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 START DATA SRC COMMAND: startTime=2018-03-01 13:59:31.847 requestID=uaySHcXyc0o5.0 sourceCommandID=79 executionID=11 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=uaySHcXyc0o5 principal=embedded-async sql=EXEC source.native('rename source.a_stage source.a')
> 13:59:32,040 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:32.04 requestID=L8MeUp92Tess.0 sourceCommandID=73 executionID=10 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=0 cpuTime(ns)=1493046
> 13:59:32,047 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:32.047 requestID=L8MeUp92Tess.0 sourceCommandID=74 executionID=12 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async sql=INSERT INTO source.a_stage (id) VALUES (1)
> 13:59:32,460 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:32.46 requestID=L8MeUp92Tess.0 sourceCommandID=74 executionID=12 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=4783162
> 13:59:32,462 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:32.462 requestID=L8MeUp92Tess.0 sourceCommandID=74 executionID=13 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async sql=INSERT INTO source.a_stage (id) VALUES (2)
> 13:59:32,753 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 END SRC COMMAND: endTime=2018-03-01 13:59:32.753 requestID=uaySHcXyc0o5.0 sourceCommandID=79 executionID=11 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=uaySHcXyc0o5 principal=embedded-async finalRowCount=0 cpuTime(ns)=5021072
> 13:59:32,800 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 START DATA SRC COMMAND: startTime=2018-03-01 13:59:32.8 requestID=uaySHcXyc0o5.0 sourceCommandID=80 executionID=14 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=uaySHcXyc0o5 principal=embedded-async sql=UPDATE h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE SET LoadNumber = 1, LoadState = 'LOADED', valid = TRUE, Updated = {ts'2018-03-01 13:59:32.756'}, Cardinality = 2 WHERE (VDBName = 'teiid5259') AND (VDBVersion = 1) AND (schemaName = 'View') AND (Name = 'mat_a') AND (loadNumber = 1)
> 13:59:32,801 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 SOURCE SRC COMMAND: endTime=2018-03-01 13:59:32.801 requestID=uaySHcXyc0o5.0 sourceCommandID=80 executionID=14 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=uaySHcXyc0o5 principal=embedded-async sourceCommand=[UPDATE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" SET "LOADNUMBER" = 1, "LOADSTATE" = 'LOADED', "VALID" = 1, "UPDATED" = TIMESTAMP '2018-03-01 13:59:32.756', "CARDINALITY" = ? WHERE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBNAME" = 'teiid5259' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBVERSION" = 1 AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."SCHEMANAME" = 'View' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."NAME" = 'mat_a' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."LOADNUMBER" = 1]
> 13:59:32,804 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 END SRC COMMAND: endTime=2018-03-01 13:59:32.804 requestID=uaySHcXyc0o5.0 sourceCommandID=80 executionID=14 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=uaySHcXyc0o5 principal=embedded-async finalRowCount=1 cpuTime(ns)=31050942
> 13:59:32,806 INFO [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 END USER COMMAND: endTime=2018-03-01 13:59:32.806 requestID=uaySHcXyc0o5.0 txID=null sessionID=uaySHcXyc0o5 principal=embedded-async vdbName=teiid5259 vdbVersion=1 finalRowCount=1
> 13:59:33,005 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:33.005 requestID=L8MeUp92Tess.0 sourceCommandID=74 executionID=13 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=4943881
> 13:59:33,014 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:33.014 requestID=L8MeUp92Tess.0 sourceCommandID=79 executionID=15 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async sql=EXEC source.native('rename source.a_stage source.a')
> 13:59:33,723 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:33.723 requestID=L8MeUp92Tess.0 sourceCommandID=79 executionID=15 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=0 cpuTime(ns)=4426814
> 13:59:33,731 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue20) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:33.731 requestID=L8MeUp92Tess.0 sourceCommandID=80 executionID=16 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sql=UPDATE h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE SET LoadNumber = 2, LoadState = 'LOADED', valid = TRUE, Updated = {ts'2018-03-01 13:59:33.725'}, Cardinality = 2 WHERE (VDBName = 'teiid5259') AND (VDBVersion = 1) AND (schemaName = 'View') AND (Name = 'mat_a') AND (loadNumber = 2)
> 13:59:33,732 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue20) L8MeUp92Tess SOURCE SRC COMMAND: endTime=2018-03-01 13:59:33.732 requestID=L8MeUp92Tess.0 sourceCommandID=80 executionID=16 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sourceCommand=[UPDATE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" SET "LOADNUMBER" = 2, "LOADSTATE" = 'LOADED', "VALID" = 1, "UPDATED" = TIMESTAMP '2018-03-01 13:59:33.725', "CARDINALITY" = ? WHERE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBNAME" = 'teiid5259' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBVERSION" = 1 AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."SCHEMANAME" = 'View' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."NAME" = 'mat_a' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."LOADNUMBER" = 2]
> 13:59:33,737 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue20) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:33.737 requestID=L8MeUp92Tess.0 sourceCommandID=80 executionID=16 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=3747146
> 13:59:33,740 INFO [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue20) L8MeUp92Tess END USER COMMAND: endTime=2018-03-01 13:59:33.74 requestID=L8MeUp92Tess.0 txID=null sessionID=L8MeUp92Tess principal=embedded-async vdbName=teiid5259 vdbVersion=1 finalRowCount=1
> 13:59:35,871 INFO [org.teiid.COMMAND_LOG] (New I/O worker #2) eP8bDNkHEpSG START USER COMMAND: startTime=2018-03-01 13:59:35.871 requestID=eP8bDNkHEpSG.0 txID=null sessionID=eP8bDNkHEpSG applicationName=JDBC principal=user@teiid-security vdbName=teiid5259 vdbVersion=1 sql=SELECT COUNT(*) FROM mat_a
> 13:59:35,877 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue22) eP8bDNkHEpSG START DATA SRC COMMAND: startTime=2018-03-01 13:59:35.877 requestID=eP8bDNkHEpSG.0 sourceCommandID=6 executionID=17 txID=null modelName=h2Source translatorName=h2 sessionID=eP8bDNkHEpSG principal=user@teiid-security sql=SELECT g_0.VALID, g_0.LOADSTATE FROM h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE AS g_0 WHERE (g_0.VDBNAME = 'teiid5259') AND (g_0.VDBVERSION = 1) AND (g_0.SCHEMANAME = 'View') AND (g_0.NAME = 'mat_a')
> 13:59:35,877 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue22) eP8bDNkHEpSG SOURCE SRC COMMAND: endTime=2018-03-01 13:59:35.877 requestID=eP8bDNkHEpSG.0 sourceCommandID=6 executionID=17 txID=null modelName=h2Source translatorName=h2 sessionID=eP8bDNkHEpSG principal=user@teiid-security sourceCommand=[SELECT g_0."VALID", g_0."LOADSTATE" FROM "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" AS g_0 WHERE g_0."VDBNAME" = 'teiid5259' AND g_0."VDBVERSION" = 1 AND g_0."SCHEMANAME" = 'View' AND g_0."NAME" = 'mat_a']
> 13:59:35,878 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue23) eP8bDNkHEpSG END SRC COMMAND: endTime=2018-03-01 13:59:35.878 requestID=eP8bDNkHEpSG.0 sourceCommandID=6 executionID=17 txID=null modelName=h2Source translatorName=h2 sessionID=eP8bDNkHEpSG principal=user@teiid-security finalRowCount=1 cpuTime(ns)=904441
> 13:59:35,879 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue24) eP8bDNkHEpSG START DATA SRC COMMAND: startTime=2018-03-01 13:59:35.879 requestID=eP8bDNkHEpSG.0 sourceCommandID=9 executionID=18 txID=null modelName=source translatorName=tr-override sessionID=eP8bDNkHEpSG principal=user@teiid-security sql=SELECT g_0.id FROM source.a AS g_0
> 13:59:36,326 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue25) eP8bDNkHEpSG END SRC COMMAND: endTime=2018-03-01 13:59:36.326 requestID=eP8bDNkHEpSG.0 sourceCommandID=9 executionID=18 txID=null modelName=source translatorName=tr-override sessionID=eP8bDNkHEpSG principal=user@teiid-security finalRowCount=1 cpuTime(ns)=32679662
> 13:59:36,384 INFO [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue26) eP8bDNkHEpSG END USER COMMAND: endTime=2018-03-01 13:59:36.384 requestID=eP8bDNkHEpSG.0 txID=null sessionID=eP8bDNkHEpSG principal=user@teiid-security vdbName=teiid5259 vdbVersion=1 finalRowCount=1
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 5 months
[JBoss JIRA] (TEIID-5406) Allow usage of long datatype as the increment parameter in TimestampAdd function
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5406?page=com.atlassian.jira.plugin... ]
Work on TEIID-5406 started by Steven Hawkins.
---------------------------------------------
> Allow usage of long datatype as the increment parameter in TimestampAdd function
> --------------------------------------------------------------------------------
>
> Key: TEIID-5406
> URL: https://issues.jboss.org/browse/TEIID-5406
> Project: Teiid
> Issue Type: Enhancement
> Components: Query Engine
> Affects Versions: 10.2
> Environment: teiid-10.2.0 on WildFly Full 11.0.0.Final (WildFly Core 3.0.8.Final)
> Reporter: dalex dalex
> Assignee: Steven Hawkins
> Fix For: 11.1
>
>
> Currently the TIMESTAMPADD(interval, count, timestamp) expects the count parameter to be integer. This is inconsistent with the return value of the TIMSTAMPDIFF function that is long. Thus we cannot take the fraction of the count returned by TIMSTAMPDIFF and submit it to TIMESTAMPADD. Since the SQL_TSI_FRAC_SECOND difference is too large for most human values (and it's the only way to retrieve millis, even though millions of millis), we need a way to submit this data to TIMSTAMPADD.
> 1. There is an inconsistency when adding 1 billion fractions of a second. Please execute the script below, one adds one billion minus one, the next one exactly 1bln fractions which results in two values, one of which is 1 fraction larger than expected:
> {code:sql}
> Select TimestampAdd(SQL_TSI_FRAC_SECOND, 999999999, Cast(CurDate() as timestamp))
> Union All
> Select TimestampAdd(SQL_TSI_FRAC_SECOND, 999999999 + 1, Cast(CurDate() as timestamp));;
> {code}
> 2. Another example:
> {code:sql}
> Begin
> Declare timestamp initialDate = CurDate();
> Declare long diff = TimestampDiff(SQL_TSI_FRAC_SECOND, initialDate, TimestampAdd(SQL_TSI_DAY, 1, initialDate));
> Declare timestamp back = TimestampAdd(SQL_TSI_FRAC_SECOND, diff, initialDate);
> select initialDate, back;
> End ;;
> {code}
> which leads to the following error message:
> {code:noformat}
> 2018-07-03 10:10:33,942 WARN [org.teiid.PROCESSOR] (Worker7_QueryProcessorQueue47) 1RBg/ooz5vx7 TEIID30020 Processing exception for request 1RBg/ooz5vx7.27 'TEIID30070 The function
> 'TimestampAdd(SQL_TSI_FRAC_SECOND, VARIABLES.diff, VARIABLES.initialDate)' is a valid function form, but the arguments do not match a known type signature and cannot be converted usi
> ng implicit type conversions.'. Originally QueryResolverException ResolverVisitor.java:757.: org.teiid.api.exception.query.QueryResolverException: TEIID30070 The function 'TimestampA
> dd(SQL_TSI_FRAC_SECOND, VARIABLES.diff, VARIABLES.initialDate)' is a valid function form, but the arguments do not match a known type signature and cannot be converted using implicit
> type conversions.
> at org.teiid.query.resolver.util.ResolverVisitor.resolveFunction(ResolverVisitor.java:757)
> at org.teiid.query.resolver.util.ResolverVisitor.visit(ResolverVisitor.java:392)
> at org.teiid.query.sql.symbol.Function.acceptVisitor(Function.java:169)
> at org.teiid.query.sql.navigator.AbstractNavigator.visitVisitor(AbstractNavigator.java:50)
> at org.teiid.query.sql.navigator.PreOrPostOrderNavigator.postVisitVisitor(PreOrPostOrderNavigator.java:57)
> at org.teiid.query.sql.navigator.PreOrPostOrderNavigator.visit(PreOrPostOrderNavigator.java:194)
> at org.teiid.query.sql.symbol.Function.acceptVisitor(Function.java:169)
> at org.teiid.query.resolver.util.ResolverVisitor.resolveLanguageObject(ResolverVisitor.java:1456)
> at org.teiid.query.resolver.command.UpdateProcedureResolver.resolveStatement(UpdateProcedureResolver.java:234)
> at org.teiid.query.resolver.command.UpdateProcedureResolver.resolveBlock(UpdateProcedureResolver.java:127)
> at org.teiid.query.resolver.command.UpdateProcedureResolver.resolveCommand(UpdateProcedureResolver.java:110)
> at org.teiid.query.resolver.QueryResolver.resolveCommand(QueryResolver.java:282)
> at org.teiid.query.resolver.QueryResolver.resolveCommand(QueryResolver.java:128)
> at org.teiid.dqp.internal.process.Request.resolveCommand(Request.java:282)
> at org.teiid.dqp.internal.process.Request.generatePlan(Request.java:418)
> at org.teiid.dqp.internal.process.Request.processRequest(Request.java:486)
> at org.teiid.dqp.internal.process.RequestWorkItem.processNew(RequestWorkItem.java:660)
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:339)
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:47)
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:276)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:277)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:115)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:206)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 5 months
[JBoss JIRA] (TEIID-5406) Allow usage of long datatype as the increment parameter in TimestampAdd function
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5406?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-5406:
----------------------------------
Fix Version/s: 11.1
> Allow usage of long datatype as the increment parameter in TimestampAdd function
> --------------------------------------------------------------------------------
>
> Key: TEIID-5406
> URL: https://issues.jboss.org/browse/TEIID-5406
> Project: Teiid
> Issue Type: Enhancement
> Components: Query Engine
> Affects Versions: 10.2
> Environment: teiid-10.2.0 on WildFly Full 11.0.0.Final (WildFly Core 3.0.8.Final)
> Reporter: dalex dalex
> Assignee: Steven Hawkins
> Fix For: 11.1
>
>
> Currently the TIMESTAMPADD(interval, count, timestamp) expects the count parameter to be integer. This is inconsistent with the return value of the TIMSTAMPDIFF function that is long. Thus we cannot take the fraction of the count returned by TIMSTAMPDIFF and submit it to TIMESTAMPADD. Since the SQL_TSI_FRAC_SECOND difference is too large for most human values (and it's the only way to retrieve millis, even though millions of millis), we need a way to submit this data to TIMSTAMPADD.
> 1. There is an inconsistency when adding 1 billion fractions of a second. Please execute the script below, one adds one billion minus one, the next one exactly 1bln fractions which results in two values, one of which is 1 fraction larger than expected:
> {code:sql}
> Select TimestampAdd(SQL_TSI_FRAC_SECOND, 999999999, Cast(CurDate() as timestamp))
> Union All
> Select TimestampAdd(SQL_TSI_FRAC_SECOND, 999999999 + 1, Cast(CurDate() as timestamp));;
> {code}
> 2. Another example:
> {code:sql}
> Begin
> Declare timestamp initialDate = CurDate();
> Declare long diff = TimestampDiff(SQL_TSI_FRAC_SECOND, initialDate, TimestampAdd(SQL_TSI_DAY, 1, initialDate));
> Declare timestamp back = TimestampAdd(SQL_TSI_FRAC_SECOND, diff, initialDate);
> select initialDate, back;
> End ;;
> {code}
> which leads to the following error message:
> {code:noformat}
> 2018-07-03 10:10:33,942 WARN [org.teiid.PROCESSOR] (Worker7_QueryProcessorQueue47) 1RBg/ooz5vx7 TEIID30020 Processing exception for request 1RBg/ooz5vx7.27 'TEIID30070 The function
> 'TimestampAdd(SQL_TSI_FRAC_SECOND, VARIABLES.diff, VARIABLES.initialDate)' is a valid function form, but the arguments do not match a known type signature and cannot be converted usi
> ng implicit type conversions.'. Originally QueryResolverException ResolverVisitor.java:757.: org.teiid.api.exception.query.QueryResolverException: TEIID30070 The function 'TimestampA
> dd(SQL_TSI_FRAC_SECOND, VARIABLES.diff, VARIABLES.initialDate)' is a valid function form, but the arguments do not match a known type signature and cannot be converted using implicit
> type conversions.
> at org.teiid.query.resolver.util.ResolverVisitor.resolveFunction(ResolverVisitor.java:757)
> at org.teiid.query.resolver.util.ResolverVisitor.visit(ResolverVisitor.java:392)
> at org.teiid.query.sql.symbol.Function.acceptVisitor(Function.java:169)
> at org.teiid.query.sql.navigator.AbstractNavigator.visitVisitor(AbstractNavigator.java:50)
> at org.teiid.query.sql.navigator.PreOrPostOrderNavigator.postVisitVisitor(PreOrPostOrderNavigator.java:57)
> at org.teiid.query.sql.navigator.PreOrPostOrderNavigator.visit(PreOrPostOrderNavigator.java:194)
> at org.teiid.query.sql.symbol.Function.acceptVisitor(Function.java:169)
> at org.teiid.query.resolver.util.ResolverVisitor.resolveLanguageObject(ResolverVisitor.java:1456)
> at org.teiid.query.resolver.command.UpdateProcedureResolver.resolveStatement(UpdateProcedureResolver.java:234)
> at org.teiid.query.resolver.command.UpdateProcedureResolver.resolveBlock(UpdateProcedureResolver.java:127)
> at org.teiid.query.resolver.command.UpdateProcedureResolver.resolveCommand(UpdateProcedureResolver.java:110)
> at org.teiid.query.resolver.QueryResolver.resolveCommand(QueryResolver.java:282)
> at org.teiid.query.resolver.QueryResolver.resolveCommand(QueryResolver.java:128)
> at org.teiid.dqp.internal.process.Request.resolveCommand(Request.java:282)
> at org.teiid.dqp.internal.process.Request.generatePlan(Request.java:418)
> at org.teiid.dqp.internal.process.Request.processRequest(Request.java:486)
> at org.teiid.dqp.internal.process.RequestWorkItem.processNew(RequestWorkItem.java:660)
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:339)
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:47)
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:276)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:277)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:115)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:206)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 5 months
[JBoss JIRA] (TEIID-5404) JPA Translator fails embeddeds
by Harold Campbell (JIRA)
[ https://issues.jboss.org/browse/TEIID-5404?page=com.atlassian.jira.plugin... ]
Harold Campbell commented on TEIID-5404:
----------------------------------------
Is there anything preventing this getting merged?
> JPA Translator fails embeddeds
> ------------------------------
>
> Key: TEIID-5404
> URL: https://issues.jboss.org/browse/TEIID-5404
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Reporter: Harold Campbell
> Assignee: Steven Hawkins
> Fix For: 11.1
>
>
> The JPA translator does not properly handle embedded properties. Columns can overlap if the embedded has properties sharing the same name as the parent or other embedded properties. Come query time, embedded columns do not get translated into correct entity path traversals.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 5 months