[JBoss JIRA] (TEIID-2958) MongoDB: Remove the need to have parent id in embedded table
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-2958?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-2958.
---------------------------------
> MongoDB: Remove the need to have parent id in embedded table
> -------------------------------------------------------------
>
> Key: TEIID-2958
> URL: https://issues.jboss.org/browse/TEIID-2958
> Project: Teiid
> Issue Type: Enhancement
> Components: Misc. Connectors
> Affects Versions: 8.7
> Environment: MongoDB with Teiid
> Reporter: Ivan Chan
> Assignee: Ramesh Reddy
> Labels: teiid
> Fix For: 8.7.1, 8.9
>
>
> Currently, it seems like ID needs to be appear in parent and child for nested documents. But it is unlikely a case for MongoDB customers. It would be nice if Teiid can flatten out data in one single table. Therefore, users would not need to insert parent id in the child document in order for Teiid to work.
> I am thinking the following case. For example I have a JSON object like this:
> {code}
> Customer
> {
> _id: 1374932,
> FirstName: "John",
> LastName: "Doe",
> Address: {
> _id: 43839430,
> customer_id: IDRef("Customer", 1374932)
> Street: "123 Lane",
> City: "New York",
> State: "NY",
> Zipcode: "12345"
> }
> }
> {code}
> the Teiid should work with document such as
>
> {code}
> Customer
> {
> _id: 1374932,
> FirstName: "John",
> LastName: "Doe",
> Address: {
> _id: 43839430,
> Street: "123 Lane",
> City: "New York",
> State: "NY",
> Zipcode: "12345"
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 11 months
[JBoss JIRA] (TEIID-3107) NPE when WS translator not used with ContentHeaders argument
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3107?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-3107.
---------------------------------
> NPE when WS translator not used with ContentHeaders argument
> ------------------------------------------------------------
>
> Key: TEIID-3107
> URL: https://issues.jboss.org/browse/TEIID-3107
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.8
> Reporter: Ramesh Reddy
> Assignee: Steven Hawkins
> Fix For: 8.9
>
>
> TEIID-3016 added new headers argument, when by default it is not used in the invokeHTTP procedure the following exception is seen. I also tried named parameters to avoid the issue but no change in situation.
> {code}
> java.lang.NullPointerException
> at org.teiid.translator.ws.BinaryWSProcedureExecution.execute(BinaryWSProcedureExecution.java:138)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:326) [teiid-engine-8.9.0.Alpha3-SNAPSHOT.jar:8.9.0.Alpha3-SNAPSHOT]
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:298) [teiid-engine-8.9.0.Alpha3-SNAPSHOT.jar:8.9.0.Alpha3-SNAPSHOT]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:110) [teiid-engine-8.9.0.Alpha3-SNAPSHOT.jar:8.9.0.Alpha3-SNAPSHOT]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:107) [teiid-engine-8.9.0.Alpha3-SNAPSHOT.jar:8.9.0.Alpha3-SNAPSHOT]
> at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_65]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:58) [teiid-engine-8.9.0.Alpha3-SNAPSHOT.jar:8.9.0.Alpha3-SNAPSHOT]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:274) [teiid-engine-8.9.0.Alpha3-SNAPSHOT.jar:8.9.0.Alpha3-SNAPSHOT]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.9.0.Alpha3-SNAPSHOT.jar:8.9.0.Alpha3-SNAPSHOT]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:214) [teiid-engine-8.9.0.Alpha3-SNAPSHOT.jar:8.9.0.Alpha3-SNAPSHOT]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_65]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_65]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_65]
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 11 months
[JBoss JIRA] (TEIID-3391) Double value is truncated in Where clause
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3391?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-3391.
---------------------------------
> Double value is truncated in Where clause
> -----------------------------------------
>
> Key: TEIID-3391
> URL: https://issues.jboss.org/browse/TEIID-3391
> Project: Teiid
> Issue Type: Feature Request
> Reporter: Mark Tawk
> Assignee: Steven Hawkins
> Priority: Blocker
>
> I'm using Teiid 8.10.0 Final over H2 Database.
> I have an H2 table containing a field of Type Double.
> When i add a where condition over this field with a double value, this value is truncated by Teiid and the query returns no records.
> You find below the query executed with Teiid and the execution plan:
> select "Locations"."Sheet0_EPr_090315_Lat" as "LAT_MapCalculatedField","Locations"."Sheet0_EPr_090315_Long" as "LNG_MapCalculatedField","Locations"."Sheet0_EPr_090315_SDView_INC" as "Locations_Sheet0_EPr_090315_1",COUNT( distinct "IM123View"."SDView_INCIDENTSM1_INCIDENT_") as "IM123View_SDView_INCIDENTSM1" from "implifyBusinessModel"."IM123View" "IM123View" LEFT JOIN "implifyBusinessModel"."Locations" "Locations" ON "IM123View"."SDView_INCIDENTSM1_LOCATION_" = "Locations"."Sheet0_EPr_090315_SDView_INC"
> where ("Locations"."Sheet0_EPr_090315_Lat" IN (31.953582763671875) ) group by "Locations"."Sheet0_EPr_090315_Lat","Locations"."Sheet0_EPr_090315_Long","Locations"."Sheet0_EPr_090315_SDView_INC"
> -----Teiid Show Plan ----
> <?xml version='1.0' encoding='UTF-8'?><node name="AccessNode"><property name="Relational Node ID"><value>1</value></property><property name="Output Columns"><value>LAT_MapCalculatedField (float)</value><value>LNG_MapCalculatedField (float)</value><value>Locations_Sheet0_EPr_090315_1 (string)</value><value>IM123View_SDView_INCIDENTSM1 (integer)</value></property><property name="Statistics"><value>Node Output Rows: 0</value><value>Node Next Batch Process Time: 0</value><value>Node Cumulative Next Batch Process Time: 0</value><value>Node Cumulative Process Time: 16</value><value>Node Next Batch Calls: 2</value><value>Node Blocks: 1</value></property><property name="Cost Estimates"><value>Estimated Node Cardinality: -1.0</value></property><property name="Query"><value>
> SELECT g_1.Sheet0_EPr_090315_Lat, g_1.Sheet0_EPr_090315_Long, g_1.Sheet0_EPr_090315_SDView_INC, COUNT(DISTINCT g_0.SDView_INCIDENTSM1_INCIDENT_)
> FROM implify_viewModel.implify_view.IM123View AS g_0, implify_viewModel.implify_view.Locations AS g_1 WHERE (g_0.SDView_INCIDENTSM1_LOCATION_ = g_1.Sheet0_EPr_090315_SDView_INC) AND (g_1.Sheet0_EPr_090315_Lat = 31.953583) GROUP BY g_1.Sheet0_EPr_090315_Lat, g_1.Sheet0_EPr_090315_Long, g_1.Sheet0_EPr_090315_SDView_INC</value></property><property name="Model Name"><value>implify_viewModel</value></property><property name="Data Bytes Sent"><value>0</value></property></node>
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 11 months
[JBoss JIRA] (TEIID-3421) Add ability to create Teiid language based custom functions
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3421?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-3421.
---------------------------------
> Add ability to create Teiid language based custom functions
> -----------------------------------------------------------
>
> Key: TEIID-3421
> URL: https://issues.jboss.org/browse/TEIID-3421
> Project: Teiid
> Issue Type: Feature Request
> Reporter: Marc Shirley
> Assignee: Steven Hawkins
>
> Add the capability to create user defined functions that do not require Java backing. Use case would be something like a library of string manipulation functions such as separating a username or domain from an email address. For example:
> BEGIN
> SELECT substring(inputValue, 0, (locate('@', inputValue) - 1)) AS username;
> END
> Once the function is defined in the function library model, the user would then be able to utilize the functions in ad hoc queries like the below:
> SELECT getUsername(email) as username ...
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 11 months
[JBoss JIRA] (TEIID-3500) execute SYSADMIN.matViewStatus failed cause infinite loop in MaterializationManager JobSchedular
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3500?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-3500.
---------------------------------
> execute SYSADMIN.matViewStatus failed cause infinite loop in MaterializationManager JobSchedular
> ------------------------------------------------------------------------------------------------
>
> Key: TEIID-3500
> URL: https://issues.jboss.org/browse/TEIID-3500
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.11
> Reporter: Kylin Soong
> Attachments: ExternalMaterializationMysql.java, mat-mysql-vdb-debug.xml, mat-mysql-vdb.xml, schema.sql
>
>
> While using Mysql, SYSADMIN.matViewStatus throw a SQLExecption
> ~~~
> java.sql.SQLException: org.teiid.api.exception.query.QueryProcessingException: TEIID30168 Couldn't execute the dynamic SQL command "EXECUTE IMMEDIATE (('SELECT TargetSchemaName, TargetName, Valid, LoadState, Updated, Cardinality, LoadNumber, VARIABLES.action FROM ' || VARIABLES.statusTable) || crit) AS TargetSchemaName string, TargetName string, Valid boolean, LoadState string, Updated timestamp, Cardinality long, LoadNumber long, OnErrorAction string USING vdbName = VARIABLES.vdbName, vdbVersion = VARIABLES.vdbVersion, schemaName = matViewStatus.schemaName, viewName = matViewStatus.viewName" with the SQL statement "(('SELECT TargetSchemaName, TargetName, Valid, LoadState, Updated, Cardinality, LoadNumber, VARIABLES.action FROM ' || VARIABLES.statusTable) || crit)" due to: The datatype 'clob' for element 'Cardinality' in the dynamic SQL cannot be implicitly converted to 'long'.
> ~~~
> this cause scheduleJob infinite loop, 'SYSADMIN.loadMatView' never be executed.
> If we didn't configure 'teiid_rel:MATVIEW_TTL', execute SYSADMIN.matViewStatus manually , full stack trace as [1]
> If test with H2 database, SYSADMIN.matViewStatus works fine.
> [1] stack trace
> ~~~
> 2015-06-01 11:35 088 WARNING [org.teiid.PROCESSOR] (main) TEIID30020 Processing exception for request gQ25UW2DqodQ.7 'TEIID30168 Couldn't execute the dynamic SQL command "EXECUTE IMMEDIATE (('SELECT TargetSchemaName, TargetName, Valid, LoadState, Updated, Cardinality, LoadNumber, VARIABLES.action FROM ' || VARIABLES.statusTable) || crit) AS TargetSchemaName string, TargetName string, Valid boolean, LoadState string, Updated timestamp, Cardinality long, LoadNumber long, OnErrorAction string USING vdbName = VARIABLES.vdbName, vdbVersion = VARIABLES.vdbVersion, schemaName = matViewStatus.schemaName, viewName = matViewStatus.viewName" with the SQL statement "(('SELECT TargetSchemaName, TargetName, Valid, LoadState, Updated, Cardinality, LoadNumber, VARIABLES.action FROM ' || VARIABLES.statusTable) || crit)" due to: The datatype 'clob' for element 'Cardinality' in the dynamic SQL cannot be implicitly converted to 'long'.'. Originally QueryProcessingException ExecDynamicSqlInstruction.java:341. Enable more detailed logging to see the entire stacktrace.
> org.teiid.jdbc.TeiidSQLException: TEIID30168 Couldn't execute the dynamic SQL command "EXECUTE IMMEDIATE (('SELECT TargetSchemaName, TargetName, Valid, LoadState, Updated, Cardinality, LoadNumber, VARIABLES.action FROM ' || VARIABLES.statusTable) || crit) AS TargetSchemaName string, TargetName string, Valid boolean, LoadState string, Updated timestamp, Cardinality long, LoadNumber long, OnErrorAction string USING vdbName = VARIABLES.vdbName, vdbVersion = VARIABLES.vdbVersion, schemaName = matViewStatus.schemaName, viewName = matViewStatus.viewName" with the SQL statement "(('SELECT TargetSchemaName, TargetName, Valid, LoadState, Updated, Cardinality, LoadNumber, VARIABLES.action FROM ' || VARIABLES.statusTable) || crit)" due to: The datatype 'clob' for element 'Cardinality' in the dynamic SQL cannot be implicitly converted to 'long'.
> at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:135)
> at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:71)
> at org.teiid.jdbc.StatementImpl.postReceiveResults(StatementImpl.java:694)
> at org.teiid.jdbc.StatementImpl.access$100(StatementImpl.java:64)
> at org.teiid.jdbc.StatementImpl$2.onCompletion(StatementImpl.java:533)
> at org.teiid.client.util.ResultsFuture.addCompletionListener(ResultsFuture.java:148)
> at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:529)
> at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:1062)
> at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:314)
> at org.teiid.example.util.JDBCUtils.execute(JDBCUtils.java:86)
> at org.teiid.test.perf.ExternalMaterializationMysqlDebug.executeMatViewStatus(ExternalMaterializationMysqlDebug.java:83)
> at org.teiid.test.perf.ExternalMaterializationMysqlDebug.main(ExternalMaterializationMysqlDebug.java:65)
> Caused by: org.teiid.api.exception.query.QueryProcessingException: TEIID30168 Couldn't execute the dynamic SQL command "EXECUTE IMMEDIATE (('SELECT TargetSchemaName, TargetName, Valid, LoadState, Updated, Cardinality, LoadNumber, VARIABLES.action FROM ' || VARIABLES.statusTable) || crit) AS TargetSchemaName string, TargetName string, Valid boolean, LoadState string, Updated timestamp, Cardinality long, LoadNumber long, OnErrorAction string USING vdbName = VARIABLES.vdbName, vdbVersion = VARIABLES.vdbVersion, schemaName = matViewStatus.schemaName, viewName = matViewStatus.viewName" with the SQL statement "(('SELECT TargetSchemaName, TargetName, Valid, LoadState, Updated, Cardinality, LoadNumber, VARIABLES.action FROM ' || VARIABLES.statusTable) || crit)" due to: The datatype 'clob' for element 'Cardinality' in the dynamic SQL cannot be implicitly converted to 'long'.
> at org.teiid.query.processor.proc.ExecDynamicSqlInstruction.process(ExecDynamicSqlInstruction.java:249)
> at org.teiid.query.processor.proc.ProcedurePlan.processProcedure(ProcedurePlan.java:384)
> at org.teiid.query.processor.proc.ProcedurePlan.nextBatchDirect(ProcedurePlan.java:293)
> at org.teiid.query.processor.proc.ProcedurePlan.nextBatch(ProcedurePlan.java:267)
> at org.teiid.query.processor.relational.PlanExecutionNode.nextBatchDirect(PlanExecutionNode.java:118)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278)
> at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:148)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278)
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:145)
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151)
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146)
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:457)
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:339)
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51)
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:267)
> at org.teiid.dqp.internal.process.DQPCore.executeRequest(DQPCore.java:298)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.teiid.transport.LocalServerConnection$1$1.call(LocalServerConnection.java:175)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:260)
> at org.teiid.transport.LocalServerConnection$1.invoke(LocalServerConnection.java:173)
> at com.sun.proxy.$Proxy11.executeRequest(Unknown Source)
> at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:661)
> at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:527)
> ... 5 more
> Caused by: org.teiid.api.exception.query.QueryProcessingException: The datatype 'clob' for element 'Cardinality' in the dynamic SQL cannot be implicitly converted to 'long'.
> at org.teiid.query.processor.proc.ExecDynamicSqlInstruction.validateDynamicCommand(ExecDynamicSqlInstruction.java:341)
> at org.teiid.query.processor.proc.ExecDynamicSqlInstruction.process(ExecDynamicSqlInstruction.java:168)
> ... 34 more
> ~~~
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 11 months