[JBoss JIRA] (TEIID-3842) Teiid's query's explain not consistence with other Database
by Kylin Soong (JIRA)
[ https://issues.jboss.org/browse/TEIID-3842?page=com.atlassian.jira.plugin... ]
Kylin Soong commented on TEIID-3842:
------------------------------------
> You also don't need to use any JDBC / Java specific API by issuing a "SHOW PLAN" statement.
Current if execute
{code}
SHOW PLAN SELECT * FROM Stock
{code}
SQL Parse throw a exception
{code}
Caused by: org.teiid.api.exception.query.QueryParserException: TEIID31100 Parsing error: Encountered "[*]SHOW[*] PLAN SELECT" at line 1, column 1.
Was expecting: "alter" | "begin" | "call" | "create" | "delete" | "drop" | "exec" | "execute" | "insert" | "merge" ...
at org.teiid.query.parser.QueryParser.convertParserException(QueryParser.java:214)
{code}
> Teiid's query's explain not consistence with other Database
> ------------------------------------------------------------
>
> Key: TEIID-3842
> URL: https://issues.jboss.org/browse/TEIID-3842
> Project: Teiid
> Issue Type: Enhancement
> Components: Query Engine
> Affects Versions: 9.x
> Reporter: Kylin Soong
> Assignee: Kylin Soong
> Fix For: 9.x
>
>
> h2. The way to get execution plan is not consistence with others
> For most of RDBMS(Oracle, Mysql), the execution plan get via SQL query
> {code}
> explain select ...
> {code}
> But in Teiid, we need use Teiid API, and need enable showplan in advance:
> {code}
> statement.execute("set showplan on");
> ResultSet rs = statement.executeQuery("select ...");
> TeiidStatement tstatement = statement.unwrap(TeiidStatement.class);
> PlanNode queryPlan = tstatement.getPlanDescription();
> System.out.println(queryPlan);
> {code}
> Cache Hint can be added as prefix, so I think we can enhance that show plan also as prefix, in order for consistence with others.
> h2. The plan structure is too complex
> [1] is the query plan of dynamicvdb-datafederation which is 2 datasources' federation, it long, complex, for the users/customers, it's not easy for them to understand. So can we enhance that simplify the output, like add a format option that can output as matrix/table.
> [1] dynamicvdb-datafederation's 'select * from Stock' query plan
> {code}
> ProjectNode
> + Relational Node ID:0
> + Output Columns:
> 0: product_id (integer)
> 1: symbol (string)
> 2: price (bigdecimal)
> 3: company_name (string)
> + Statistics:
> 0: Node Output Rows: 9
> 1: Node Next Batch Process Time: 0
> 2: Node Cumulative Next Batch Process Time: 12
> 3: Node Cumulative Process Time: 21
> 4: Node Next Batch Calls: 3
> 5: Node Blocks: 2
> + Cost Estimates:Estimated Node Cardinality: -1.0
> + Child 0:
> JoinNode
> + Relational Node ID:1
> + Output Columns:
> 0: ID (integer)
> 1: symbol (string)
> 2: price (bigdecimal)
> 3: COMPANY_NAME (string)
> + Statistics:
> 0: Node Output Rows: 9
> 1: Node Next Batch Process Time: 4
> 2: Node Cumulative Next Batch Process Time: 12
> 3: Node Cumulative Process Time: 21
> 4: Node Next Batch Calls: 3
> 5: Node Blocks: 2
> + Cost Estimates:Estimated Node Cardinality: -1.0
> + Child 0:
> JoinNode
> + Relational Node ID:2
> + Output Columns:
> 0: symbol (string)
> 1: price (bigdecimal)
> + Statistics:
> 0: Node Output Rows: 10
> 1: Node Next Batch Process Time: 2
> 2: Node Cumulative Next Batch Process Time: 7
> 3: Node Cumulative Process Time: 7
> 4: Node Next Batch Calls: 2
> 5: Node Blocks: 1
> + Cost Estimates:Estimated Node Cardinality: -1.0
> + Child 0:
> ProjectNode
> + Relational Node ID:3
> + Output Columns:file (clob)
> + Statistics:
> 0: Node Output Rows: 1
> 1: Node Next Batch Process Time: 0
> 2: Node Cumulative Next Batch Process Time: 2
> 3: Node Cumulative Process Time: 2
> 4: Node Next Batch Calls: 1
> 5: Node Blocks: 0
> + Cost Estimates:Estimated Node Cardinality: -1.0
> + Child 0:
> AccessNode
> + Relational Node ID:4
> + Output Columns:
> 0: file (clob)
> 1: filePath (string)
> + Statistics:
> 0: Node Output Rows: 1
> 1: Node Next Batch Process Time: 2
> 2: Node Cumulative Next Batch Process Time: 2
> 3: Node Cumulative Process Time: 2
> 4: Node Next Batch Calls: 1
> 5: Node Blocks: 0
> + Cost Estimates:Estimated Node Cardinality: -1.0
> + Query:EXEC MarketData.getTextFiles('*.txt')
> + Model Name:MarketData
> + Select Columns:MarketData.getTextFiles.file
> + Child 1:
> TextTableNode
> + Relational Node ID:5
> + Output Columns:
> 0: symbol (string)
> 1: price (bigdecimal)
> + Statistics:
> 0: Node Output Rows: 10
> 1: Node Next Batch Process Time: 3
> 2: Node Cumulative Next Batch Process Time: 3
> 3: Node Cumulative Process Time: 3
> 4: Node Next Batch Calls: 2
> 5: Node Blocks: 1
> + Cost Estimates:Estimated Node Cardinality: -1.0
> + Table Function:TEXTTABLE(f.file COLUMNS symbol string, price bigdecimal HEADER) AS SP
> + Join Strategy:NESTED TABLE JOIN
> + Join Type:CROSS JOIN
> + Join Criteria
> + Child 1:
> AccessNode
> + Relational Node ID:6
> + Output Columns:
> 0: SYMBOL (string)
> 1: ID (integer)
> 2: COMPANY_NAME (string)
> + Statistics:
> 0: Node Output Rows: 25
> 1: Node Next Batch Process Time: 1
> 2: Node Cumulative Next Batch Process Time: 1
> 3: Node Cumulative Process Time: 17
> 4: Node Next Batch Calls: 5
> 5: Node Blocks: 4
> + Cost Estimates:Estimated Node Cardinality: -1.0
> + Query:SELECT g_0.SYMBOL AS c_0, g_0.ID AS c_1, g_0.COMPANY_NAME AS c_2 FROM Accounts.PRODUCT AS g_0 ORDER BY c_0
> + Model Name:Accounts
> + Join Strategy:ENHANCED SORT JOIN RAN AS SORT MERGE (SORT/ALREADY_SORTED)
> + Join Type:INNER JOIN
> + Join Criteria:SP.symbol=A.SYMBOL
> + Select Columns:
> 0: A.ID AS product_id
> 1: SP.symbol
> 2: SP.price
> 3: A.COMPANY_NAME AS company_name
> + Data Bytes Sent:0
> + Planning Time:128
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years
[JBoss JIRA] (TEIID-3725) In the JDG translators, enable named cache swapping so that materialization can be supported
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-3725?page=com.atlassian.jira.plugin... ]
Work on TEIID-3725 stopped by Van Halbert.
------------------------------------------
> In the JDG translators, enable named cache swapping so that materialization can be supported
> --------------------------------------------------------------------------------------------
>
> Key: TEIID-3725
> URL: https://issues.jboss.org/browse/TEIID-3725
> Project: Teiid
> Issue Type: Feature Request
> Components: Misc. Connectors
> Affects Versions: 8.12
> Reporter: Van Halbert
> Assignee: Van Halbert
>
> The JDG translators, that in order to support materialization, will need to enable the named cache that's referenced by the connection, to be swapped. This is due to JDG doesn't currently support renaming a cache (i.e., like table rename in JDBC). And because of that, it limits how the cache can be refreshed (don't want to clear it before re-loading).
> Ideas are:
> 1. configure translator with the 2 cache names to use (a) initial cache to read from and (b) the staging cache to use
> perform materialize load
> call SYSADMIN.setProperty to trigger the swapping of the cache names
> 2 ???
> Note: because there's no persistence in Teiid so that any cache name changes will outlive a server restart, when a restart occurs, the translator will read from the cache identified as the initial cache to read from.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years
[JBoss JIRA] (TEIID-3725) In the JDG translators, enable named cache swapping so that materialization can be supported
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-3725?page=com.atlassian.jira.plugin... ]
Van Halbert commented on TEIID-3725:
------------------------------------
posting the comments from the email thread:
This definitely is better approach, much more akin to staging concept in the RDBMS.
Ramesh
----- Original Message -----
> We don't have cache delegates at the moment, but we would implement them
> for your needs, including a clustered swap.
>
> Tristan
>
> On 25/11/2015 18:00, Van Halbert wrote:
> > Maybe there's a version of cache delegates I missed. One of the options
> > was for Teiid to use/manage the aliases that mapped to the 2 caches. And
> > would be swapped when materialization process was performed. But an issue
> > with this is when there's a cluster of DV nodes, the name swapping would
> > have to be replicated across all the nodes. And DV doesn't have the means
> > to guarantee the name is changed on all nodes after the process is
> > performed.
> >
> > Van Halbert
> >
> In the JDG translators, enable named cache swapping so that materialization can be supported
> --------------------------------------------------------------------------------------------
>
> Key: TEIID-3725
> URL: https://issues.jboss.org/browse/TEIID-3725
> Project: Teiid
> Issue Type: Feature Request
> Components: Misc. Connectors
> Affects Versions: 8.12
> Reporter: Van Halbert
> Assignee: Van Halbert
>
> The JDG translators, that in order to support materialization, will need to enable the named cache that's referenced by the connection, to be swapped. This is due to JDG doesn't currently support renaming a cache (i.e., like table rename in JDBC). And because of that, it limits how the cache can be refreshed (don't want to clear it before re-loading).
> Ideas are:
> 1. configure translator with the 2 cache names to use (a) initial cache to read from and (b) the staging cache to use
> perform materialize load
> call SYSADMIN.setProperty to trigger the swapping of the cache names
> 2 ???
> Note: because there's no persistence in Teiid so that any cache name changes will outlive a server restart, when a restart occurs, the translator will read from the cache identified as the initial cache to read from.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years
[JBoss JIRA] (TEIID-3836) Create a quick start to demonstrate OData
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3836?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-3836:
---------------------------------------
An OData url will have the form odata/vdb/model/entity
Do you mean Stocks/StockPrices instead? Note that there is also TEIID-3814 which affects what case is expected for the model name.
> Create a quick start to demonstrate OData
> -----------------------------------------
>
> Key: TEIID-3836
> URL: https://issues.jboss.org/browse/TEIID-3836
> Project: Teiid
> Issue Type: Task
> Components: Quick Starts
> Affects Versions: 9.x
> Reporter: Kylin Soong
> Assignee: Van Halbert
> Fix For: 9.x
>
>
> Add a quick start to demonstrate OData api may helpful for users.
> After deploy portfolio-vdb.xml successful, I test with(http://localhost:8080/odata/Portfolio.1/Stocks.StockPrices) return a error:
> {code}
> TEIID16011 EntitySet "Stocks.StockPrices" is not found; Check the spelling, use modelName.tableName; The table that representing the Entity type must either have a PRIMARY KEY or UNIQUE key(s)
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 1 month
[JBoss JIRA] (TEIID-3841) sap-nw-gateway translator wrongly encodes when a parameter includes a space
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3841?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-3841.
-----------------------------------
Resolution: Done
The root issue turned out to be that we weren't encoding the parameters, so webclient was making assumptions about what the base address means. As a valid uri, the call works.
With this particular example there is an issue with SAP reporting a time type for departureTime/arrivalTime, but returning an internal value.
> sap-nw-gateway translator wrongly encodes when a parameter includes a space
> ---------------------------------------------------------------------------
>
> Key: TEIID-3841
> URL: https://issues.jboss.org/browse/TEIID-3841
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.7
> Reporter: Marc Shirley
> Assignee: Steven Hawkins
> Fix For: 8.13, 8.12.3
>
>
> Submitting a function through the sap-nw-gateway translator results in overzealous encoding of the URL when one of the parameters includes a space like "AA AB". The '?' character (along with the spaces in any parameters) in the expected URL [1] is encoded to '%3F' resulting in an error like [2] below.
> [1] https://sapes1.sapdevcenter.com/sap/opu/odata/IWFND/RMTSAMPLEFLIGHT/GetFl...'AA AB'&connectionid='0017'
> [2] org.teiid.runtime.client.TeiidClientException: java.lang.RuntimeException: Remote org.teiid.core.TeiidProcessingException: TEIID30504 flightdemo: TEIID17013 Wrong response from source with HTTP Response Code 404: Vendor Code "005056A509B11EE1B9A8FEC11C21D78E": With message "Resource not found for the segment 'GetFlightDetails%3Fairlineid='AA%20AB'&connectionid='0017''.": Detail Error null
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 1 month