[JBoss JIRA] (TEIID-5475) nth_value is incorrect for
by Steven Hawkins (JIRA)
Steven Hawkins created TEIID-5475:
-------------------------------------
Summary: nth_value is incorrect for
Key: TEIID-5475
URL: https://issues.jboss.org/browse/TEIID-5475
Project: Teiid
Issue Type: Bug
Components: Query Engine
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Priority: Blocker
Fix For: 11.2, 11.1.1
Nth_value is returning null when not expected. For example:
select e1, nth_value(e1, 2) over (order by e1) from pm1.g1
with our default data set should return 'a' for each nth_value, but instead returns null for one of the 'a' rows. The issue is that we should be considering the indexing to be relative from the start of the peer group in the frame rather than from the current index of the row.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 6 months
[JBoss JIRA] (TEIID-5472) Clean up window function project node implementation
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5472?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5472:
---------------------------------------
Another potential clean up is to allow nth_value to use the frame clause. That seems to be commonly supported and is allowed by the spec. For some reason postgresql allows the frame clause on ntile,lead/lag, but it's effectively ignored - it should raise an exception.
> Clean up window function project node implementation
> ----------------------------------------------------
>
> Key: TEIID-5472
> URL: https://issues.jboss.org/browse/TEIID-5472
> Project: Teiid
> Issue Type: Quality Risk
> Components: Query Engine
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 11.2
>
>
> The initial implementation of window functions did not allow for a frame clause and specifically separated the logic of creating row and range values. Now that the logic is more complete we should remove some of the initial design aspects.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 6 months
[JBoss JIRA] (TEIID-5473) Make JDBCMetadataProcessor more extensible with protected methods
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5473?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5473:
---------------------------------------
Do you know what others you may want accessible at this point?
> Make JDBCMetadataProcessor more extensible with protected methods
> -----------------------------------------------------------------
>
> Key: TEIID-5473
> URL: https://issues.jboss.org/browse/TEIID-5473
> Project: Teiid
> Issue Type: Feature Request
> Components: JDBC Connector
> Affects Versions: 11.1
> Reporter: Ken Geis
> Assignee: Steven Hawkins
>
> I believe I can write a JDBCMetadataProcessor that works faster against my Oracle database. The important part to override is in getIndexes(..). This method is package-private, so I cannot override it. It would be useful to me if the method (and maybe others) were made protected so that they can be overridden.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 6 months
[JBoss JIRA] (TEIID-5474) NPE on Complex Query with Procedure Call in SELECT
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5474?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-5474.
-----------------------------------
Resolution: Done
Moved the collection of correlated references prior to with planning. They will be recomputed as well afterwards, so this is slightly inefficient.
Ideally at some point we'll push the collection of correlated references back in planning to node creation or even during resolving.
> NPE on Complex Query with Procedure Call in SELECT
> --------------------------------------------------
>
> Key: TEIID-5474
> URL: https://issues.jboss.org/browse/TEIID-5474
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 11.1
> Environment: teiid-11.1.0 (from 01.09.2018) on WildFly Full 11.0.0.Final (WildFly Core 3.0.8.Final)
> Reporter: dalex dalex
> Assignee: Steven Hawkins
> Priority: Critical
> Fix For: 11.2
>
>
> Running the following query:
> {code:sql}
> SELECT
> (exec "SYSADMIN.logMsg"(
> "level" => 'INFO',
> "context" => 'DEBUG.FOO.BAR',
> "msg" => tccd.bank_account_holder_name)) as something
> FROM
> (
> SELECT c.city AS "bank_account_holder_name"
> FROM "adventureworks.address" c
> JOIN
> (
> select ca.addressid
> from "adventureworks.customeraddress" ca
> cross JOIN
> (
> WITH latest_exchange_rates AS
> (
> SELECT exchange_rate_date AS month_begin
> FROM (
> SELECT CURDATE() as exchange_rate_date
> )t
> )
> SELECT DISTINCT dt.month_start AS month_begin
> FROM (
> CALL views.createDateDimensionsTable(
> "startdate" => TIMESTAMPADD(SQL_TSI_MONTH, 1, (SELECT month_begin FROM latest_exchange_rates)),
> "enddate" => TIMESTAMPADD(SQL_TSI_YEAR, 15, (SELECT month_begin FROM latest_exchange_rates))
> ) ) AS dt
> ) fx
> ) ci ON ci.addressid = c.addressid
> ) tccd ;;
> {code}
> will throw out the following stacktrace with NPE:
> {code:noformat}
> 2018-09-13 13:35:21,777 ERROR [org.teiid.PROCESSOR] (Worker5_QueryProcessorQueue36) ZvEDctN1yjKY TEIID30019 Unexpected exception for request ZvEDctN1yjKY.15: java.lang.NullPointerExc
> eption
> at org.teiid.query.optimizer.relational.rules.RuleMergeVirtual.doMerge(RuleMergeVirtual.java:218)
> at org.teiid.query.optimizer.relational.rules.RuleMergeVirtual.execute(RuleMergeVirtual.java:80)
> at org.teiid.query.optimizer.relational.RelationalPlanner.executeRules(RelationalPlanner.java:1025)
> at org.teiid.query.optimizer.relational.RelationalPlanner.optimize(RelationalPlanner.java:228)
> at org.teiid.query.optimizer.QueryOptimizer.optimizePlan(QueryOptimizer.java:179)
> at org.teiid.dqp.internal.process.Request.generatePlan(Request.java:458)
> at org.teiid.dqp.internal.process.Request.processRequest(Request.java:486)
> at org.teiid.dqp.internal.process.RequestWorkItem.processNew(RequestWorkItem.java:672)
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:351)
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:47)
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:285)
> 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)
7 years, 6 months
[JBoss JIRA] (TEIID-5474) NPE on Complex Query with Procedure Call in SELECT
by dalex dalex (JIRA)
[ https://issues.jboss.org/browse/TEIID-5474?page=com.atlassian.jira.plugin... ]
dalex dalex commented on TEIID-5474:
------------------------------------
[~shawkins]
> Thanks for capturing this.
You're welcome! Thanks to you for fixing all these bugs so quickly as possible!
> NPE on Complex Query with Procedure Call in SELECT
> --------------------------------------------------
>
> Key: TEIID-5474
> URL: https://issues.jboss.org/browse/TEIID-5474
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 11.1
> Environment: teiid-11.1.0 (from 01.09.2018) on WildFly Full 11.0.0.Final (WildFly Core 3.0.8.Final)
> Reporter: dalex dalex
> Assignee: Steven Hawkins
> Priority: Critical
> Fix For: 11.2
>
>
> Running the following query:
> {code:sql}
> SELECT
> (exec "SYSADMIN.logMsg"(
> "level" => 'INFO',
> "context" => 'DEBUG.FOO.BAR',
> "msg" => tccd.bank_account_holder_name)) as something
> FROM
> (
> SELECT c.city AS "bank_account_holder_name"
> FROM "adventureworks.address" c
> JOIN
> (
> select ca.addressid
> from "adventureworks.customeraddress" ca
> cross JOIN
> (
> WITH latest_exchange_rates AS
> (
> SELECT exchange_rate_date AS month_begin
> FROM (
> SELECT CURDATE() as exchange_rate_date
> )t
> )
> SELECT DISTINCT dt.month_start AS month_begin
> FROM (
> CALL views.createDateDimensionsTable(
> "startdate" => TIMESTAMPADD(SQL_TSI_MONTH, 1, (SELECT month_begin FROM latest_exchange_rates)),
> "enddate" => TIMESTAMPADD(SQL_TSI_YEAR, 15, (SELECT month_begin FROM latest_exchange_rates))
> ) ) AS dt
> ) fx
> ) ci ON ci.addressid = c.addressid
> ) tccd ;;
> {code}
> will throw out the following stacktrace with NPE:
> {code:noformat}
> 2018-09-13 13:35:21,777 ERROR [org.teiid.PROCESSOR] (Worker5_QueryProcessorQueue36) ZvEDctN1yjKY TEIID30019 Unexpected exception for request ZvEDctN1yjKY.15: java.lang.NullPointerExc
> eption
> at org.teiid.query.optimizer.relational.rules.RuleMergeVirtual.doMerge(RuleMergeVirtual.java:218)
> at org.teiid.query.optimizer.relational.rules.RuleMergeVirtual.execute(RuleMergeVirtual.java:80)
> at org.teiid.query.optimizer.relational.RelationalPlanner.executeRules(RelationalPlanner.java:1025)
> at org.teiid.query.optimizer.relational.RelationalPlanner.optimize(RelationalPlanner.java:228)
> at org.teiid.query.optimizer.QueryOptimizer.optimizePlan(QueryOptimizer.java:179)
> at org.teiid.dqp.internal.process.Request.generatePlan(Request.java:458)
> at org.teiid.dqp.internal.process.Request.processRequest(Request.java:486)
> at org.teiid.dqp.internal.process.RequestWorkItem.processNew(RequestWorkItem.java:672)
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:351)
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:47)
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:285)
> 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)
7 years, 6 months
[JBoss JIRA] (TEIID-5394) Define how to utilize multiple vdbs
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-5394?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-5394:
-------------------------------------
>It does not work with -vdb.xml, -vdb.ddl, and a zip with -vdb.ddl
It does not work with zip or plain version -vdb.ddl file, I will add a filter to include those. -vdb.xml works. Basically, it needs an unzipped VDB contents under "src" directory, where it scans for any -vdb.xml file, and rest of the all the files including the subdirectories are added as is. If we are adding a previous version of the .vdb archive that contains either a -vdb.xml or -vdb.ddl the contents must be in exploded format for this project.
{code}
src
/main
/vdb
sample-vdb.xml
/ddl
model1.ddl
model2.ddl
/misc
foo.txt
{code}
But I think we should limit the VDB import to -vdb.xml files, we can do .ddl but those are in seperate admin objects, we will come back for this at later point if we need to.
>we do also have visibility overrides to deal with
Do you mean model visibilities?
> Define how to utilize multiple vdbs
> -----------------------------------
>
> Key: TEIID-5394
> URL: https://issues.jboss.org/browse/TEIID-5394
> Project: Teiid
> Issue Type: Sub-task
> Components: Build/Kits
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 11.2
>
>
> Perhaps to support vdb imports, we should define how a build can incorporate multiple vdbs.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 6 months