[JBoss JIRA] (TEIID-5285) Add high-level feature for redirection of updates
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-5285?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-5285:
-------------------------------------
[~shawkins] Should I take this and start building a framework using spring-boot, we will come back to the deployment model (sidecar etc or not) later once we have something working.
> Add high-level feature for redirection of updates
> -------------------------------------------------
>
> Key: TEIID-5285
> URL: https://issues.jboss.org/browse/TEIID-5285
> Project: Teiid
> Issue Type: Feature Request
> Components: Query Engine, Teiid Spring Boot
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 11.x
>
>
> In microservices testing it is desirable to test against production/live data but not commit any updates. We should offer a simple solution that can defined by extension metadata and enabled/disabled by a feature flag. We may need to make simplifying assumptions about the scope (per session, per application, etc.) and durability of the updates.
> Under the covers this will be achieved by using views, update triggers, and a store for the updates and when not enabled the expectation is that all operations should pass through. However the application will be limited to using Teiid SQL and will be required to use the Teiid or pg driver, or Teiid spring boot.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 7 months
[JBoss JIRA] (TEIID-5370) Allow TextTable to return Null for non-existent columns with specified Header
by dalex dalex (JIRA)
[ https://issues.jboss.org/browse/TEIID-5370?page=com.atlassian.jira.plugin... ]
dalex dalex commented on TEIID-5370:
------------------------------------
[~shawkins] cool! Thx for the quick fix!
> Allow TextTable to return Null for non-existent columns with specified Header
> -----------------------------------------------------------------------------
>
> Key: TEIID-5370
> URL: https://issues.jboss.org/browse/TEIID-5370
> Project: Teiid
> Issue Type: Quality Risk
> 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.0
>
>
> In XmlTable we can have this:
> {code:sql}
> Begin
> Declare xml ttab =
> '<root>
> <col1>1</col1>
> <col2>2</col2>
> </root>';
>
> Select * From
> XmlTable (
> '/root'
> Passing ttab
> Columns
> col1 string,
> col2 string,
> colNotExists string
> ) t;
> End;;
> {code}
> and when a column doesn't exist in the xml it will be returned as null (colNotExists in the snippet above). The similar approach for TextTable will result in an error as this column indeed doesn't exist. I think, it may be useful, if the below snippet succeeds and returns nulls for non-existent cols (we encountered with a situation when we wanted to use TextTable in a dynamic way but it failed because of not existing cols):
> {code:sql}
> Begin
> Declare clob ttab =
> 'col1,col2
> 1,2
> one,two';
> Select * From
> TextTable (
> ttab
> Columns
> col1 string,
> col2 string,
> colNotExists string
> Delimiter ','
> Header 1
> ) t;
> End;;
> {code}
> What do you think?
> At the moment the snippet above throws out the following error message:
> {code:noformat}
> 2018-06-11 15:21:15,882 WARN [org.teiid.PROCESSOR] (Worker3_QueryProcessorQueue11) YTMw2kYFv3Cp TEIID30020 Processing exception for request YTMw2kYFv3Cp.4 'TEIID30181 HEADER entry m
> issing for column name colNotExists in Unknown.'. Originally TeiidProcessingException TextTableNode.java:499.: org.teiid.core.TeiidProcessingException: TEIID30181 HEADER entry missin
> g for column name colNotExists in Unknown.
> at org.teiid.query.processor.relational.TextTableNode.processHeader(TextTableNode.java:499)
> at org.teiid.query.processor.relational.TextTableNode.initReader(TextTableNode.java:471)
> at org.teiid.query.processor.relational.TextTableNode.nextBatchDirect(TextTableNode.java:209)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
> at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:146)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:141)
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:148)
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:111)
> at org.teiid.query.processor.BatchIterator.finalRow(BatchIterator.java:65)
> at org.teiid.common.buffer.AbstractTupleSource.getCurrentTuple(AbstractTupleSource.java:66)
> at org.teiid.query.processor.BatchIterator.getCurrentTuple(BatchIterator.java:80)
> at org.teiid.common.buffer.AbstractTupleSource.hasNext(AbstractTupleSource.java:88)
> at org.teiid.query.processor.proc.ProcedurePlan.executePlan(ProcedurePlan.java:612)
> at org.teiid.query.processor.proc.CreateCursorResultSetInstruction.process(CreateCursorResultSetInstruction.java:65)
> at org.teiid.query.processor.proc.ProcedurePlan.processProcedure(ProcedurePlan.java:389)
> at org.teiid.query.processor.proc.ProcedurePlan.nextBatchDirect(ProcedurePlan.java:297)
> at org.teiid.query.processor.proc.ProcedurePlan.nextBatch(ProcedurePlan.java:269)
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:148)
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:111)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:160)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:142)
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:480)
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:350)
> 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, 7 months
[JBoss JIRA] (TEIID-5370) Allow TextTable to return Null for non-existent columns with specified Header
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5370?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-5370:
----------------------------------
Issue Type: Quality Risk (was: Bug)
Fix Version/s: 11.0
Priority: Major (was: Critical)
Marking as a quality risk rather than a bug as there is no well-defined expected behavior. This change was added to the release notes.
> Allow TextTable to return Null for non-existent columns with specified Header
> -----------------------------------------------------------------------------
>
> Key: TEIID-5370
> URL: https://issues.jboss.org/browse/TEIID-5370
> Project: Teiid
> Issue Type: Quality Risk
> 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.0
>
>
> In XmlTable we can have this:
> {code:sql}
> Begin
> Declare xml ttab =
> '<root>
> <col1>1</col1>
> <col2>2</col2>
> </root>';
>
> Select * From
> XmlTable (
> '/root'
> Passing ttab
> Columns
> col1 string,
> col2 string,
> colNotExists string
> ) t;
> End;;
> {code}
> and when a column doesn't exist in the xml it will be returned as null (colNotExists in the snippet above). The similar approach for TextTable will result in an error as this column indeed doesn't exist. I think, it may be useful, if the below snippet succeeds and returns nulls for non-existent cols (we encountered with a situation when we wanted to use TextTable in a dynamic way but it failed because of not existing cols):
> {code:sql}
> Begin
> Declare clob ttab =
> 'col1,col2
> 1,2
> one,two';
> Select * From
> TextTable (
> ttab
> Columns
> col1 string,
> col2 string,
> colNotExists string
> Delimiter ','
> Header 1
> ) t;
> End;;
> {code}
> What do you think?
> At the moment the snippet above throws out the following error message:
> {code:noformat}
> 2018-06-11 15:21:15,882 WARN [org.teiid.PROCESSOR] (Worker3_QueryProcessorQueue11) YTMw2kYFv3Cp TEIID30020 Processing exception for request YTMw2kYFv3Cp.4 'TEIID30181 HEADER entry m
> issing for column name colNotExists in Unknown.'. Originally TeiidProcessingException TextTableNode.java:499.: org.teiid.core.TeiidProcessingException: TEIID30181 HEADER entry missin
> g for column name colNotExists in Unknown.
> at org.teiid.query.processor.relational.TextTableNode.processHeader(TextTableNode.java:499)
> at org.teiid.query.processor.relational.TextTableNode.initReader(TextTableNode.java:471)
> at org.teiid.query.processor.relational.TextTableNode.nextBatchDirect(TextTableNode.java:209)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
> at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:146)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:141)
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:148)
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:111)
> at org.teiid.query.processor.BatchIterator.finalRow(BatchIterator.java:65)
> at org.teiid.common.buffer.AbstractTupleSource.getCurrentTuple(AbstractTupleSource.java:66)
> at org.teiid.query.processor.BatchIterator.getCurrentTuple(BatchIterator.java:80)
> at org.teiid.common.buffer.AbstractTupleSource.hasNext(AbstractTupleSource.java:88)
> at org.teiid.query.processor.proc.ProcedurePlan.executePlan(ProcedurePlan.java:612)
> at org.teiid.query.processor.proc.CreateCursorResultSetInstruction.process(CreateCursorResultSetInstruction.java:65)
> at org.teiid.query.processor.proc.ProcedurePlan.processProcedure(ProcedurePlan.java:389)
> at org.teiid.query.processor.proc.ProcedurePlan.nextBatchDirect(ProcedurePlan.java:297)
> at org.teiid.query.processor.proc.ProcedurePlan.nextBatch(ProcedurePlan.java:269)
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:148)
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:111)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:160)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:142)
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:480)
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:350)
> 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, 7 months
[JBoss JIRA] (TEIID-5370) Allow TextTable to return Null for non-existent columns with specified Header
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5370?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-5370.
-----------------------------------
Resolution: Done
> Allow TextTable to return Null for non-existent columns with specified Header
> -----------------------------------------------------------------------------
>
> Key: TEIID-5370
> URL: https://issues.jboss.org/browse/TEIID-5370
> Project: Teiid
> Issue Type: Quality Risk
> 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.0
>
>
> In XmlTable we can have this:
> {code:sql}
> Begin
> Declare xml ttab =
> '<root>
> <col1>1</col1>
> <col2>2</col2>
> </root>';
>
> Select * From
> XmlTable (
> '/root'
> Passing ttab
> Columns
> col1 string,
> col2 string,
> colNotExists string
> ) t;
> End;;
> {code}
> and when a column doesn't exist in the xml it will be returned as null (colNotExists in the snippet above). The similar approach for TextTable will result in an error as this column indeed doesn't exist. I think, it may be useful, if the below snippet succeeds and returns nulls for non-existent cols (we encountered with a situation when we wanted to use TextTable in a dynamic way but it failed because of not existing cols):
> {code:sql}
> Begin
> Declare clob ttab =
> 'col1,col2
> 1,2
> one,two';
> Select * From
> TextTable (
> ttab
> Columns
> col1 string,
> col2 string,
> colNotExists string
> Delimiter ','
> Header 1
> ) t;
> End;;
> {code}
> What do you think?
> At the moment the snippet above throws out the following error message:
> {code:noformat}
> 2018-06-11 15:21:15,882 WARN [org.teiid.PROCESSOR] (Worker3_QueryProcessorQueue11) YTMw2kYFv3Cp TEIID30020 Processing exception for request YTMw2kYFv3Cp.4 'TEIID30181 HEADER entry m
> issing for column name colNotExists in Unknown.'. Originally TeiidProcessingException TextTableNode.java:499.: org.teiid.core.TeiidProcessingException: TEIID30181 HEADER entry missin
> g for column name colNotExists in Unknown.
> at org.teiid.query.processor.relational.TextTableNode.processHeader(TextTableNode.java:499)
> at org.teiid.query.processor.relational.TextTableNode.initReader(TextTableNode.java:471)
> at org.teiid.query.processor.relational.TextTableNode.nextBatchDirect(TextTableNode.java:209)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
> at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:146)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:141)
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:148)
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:111)
> at org.teiid.query.processor.BatchIterator.finalRow(BatchIterator.java:65)
> at org.teiid.common.buffer.AbstractTupleSource.getCurrentTuple(AbstractTupleSource.java:66)
> at org.teiid.query.processor.BatchIterator.getCurrentTuple(BatchIterator.java:80)
> at org.teiid.common.buffer.AbstractTupleSource.hasNext(AbstractTupleSource.java:88)
> at org.teiid.query.processor.proc.ProcedurePlan.executePlan(ProcedurePlan.java:612)
> at org.teiid.query.processor.proc.CreateCursorResultSetInstruction.process(CreateCursorResultSetInstruction.java:65)
> at org.teiid.query.processor.proc.ProcedurePlan.processProcedure(ProcedurePlan.java:389)
> at org.teiid.query.processor.proc.ProcedurePlan.nextBatchDirect(ProcedurePlan.java:297)
> at org.teiid.query.processor.proc.ProcedurePlan.nextBatch(ProcedurePlan.java:269)
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:148)
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:111)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:160)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:142)
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:480)
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:350)
> 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, 7 months
[JBoss JIRA] (TEIID-5370) Allow TextTable to return Null for non-existent columns with specified Header
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5370?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5370:
---------------------------------------
Yes, this should be easily allowable in non-fixed width files.
> Allow TextTable to return Null for non-existent columns with specified Header
> -----------------------------------------------------------------------------
>
> Key: TEIID-5370
> URL: https://issues.jboss.org/browse/TEIID-5370
> Project: Teiid
> Issue Type: Bug
> 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
> Priority: Critical
>
> In XmlTable we can have this:
> {code:sql}
> Begin
> Declare xml ttab =
> '<root>
> <col1>1</col1>
> <col2>2</col2>
> </root>';
>
> Select * From
> XmlTable (
> '/root'
> Passing ttab
> Columns
> col1 string,
> col2 string,
> colNotExists string
> ) t;
> End;;
> {code}
> and when a column doesn't exist in the xml it will be returned as null (colNotExists in the snippet above). The similar approach for TextTable will result in an error as this column indeed doesn't exist. I think, it may be useful, if the below snippet succeeds and returns nulls for non-existent cols (we encountered with a situation when we wanted to use TextTable in a dynamic way but it failed because of not existing cols):
> {code:sql}
> Begin
> Declare clob ttab =
> 'col1,col2
> 1,2
> one,two';
> Select * From
> TextTable (
> ttab
> Columns
> col1 string,
> col2 string,
> colNotExists string
> Delimiter ','
> Header 1
> ) t;
> End;;
> {code}
> What do you think?
> At the moment the snippet above throws out the following error message:
> {code:noformat}
> 2018-06-11 15:21:15,882 WARN [org.teiid.PROCESSOR] (Worker3_QueryProcessorQueue11) YTMw2kYFv3Cp TEIID30020 Processing exception for request YTMw2kYFv3Cp.4 'TEIID30181 HEADER entry m
> issing for column name colNotExists in Unknown.'. Originally TeiidProcessingException TextTableNode.java:499.: org.teiid.core.TeiidProcessingException: TEIID30181 HEADER entry missin
> g for column name colNotExists in Unknown.
> at org.teiid.query.processor.relational.TextTableNode.processHeader(TextTableNode.java:499)
> at org.teiid.query.processor.relational.TextTableNode.initReader(TextTableNode.java:471)
> at org.teiid.query.processor.relational.TextTableNode.nextBatchDirect(TextTableNode.java:209)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
> at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:146)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:141)
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:148)
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:111)
> at org.teiid.query.processor.BatchIterator.finalRow(BatchIterator.java:65)
> at org.teiid.common.buffer.AbstractTupleSource.getCurrentTuple(AbstractTupleSource.java:66)
> at org.teiid.query.processor.BatchIterator.getCurrentTuple(BatchIterator.java:80)
> at org.teiid.common.buffer.AbstractTupleSource.hasNext(AbstractTupleSource.java:88)
> at org.teiid.query.processor.proc.ProcedurePlan.executePlan(ProcedurePlan.java:612)
> at org.teiid.query.processor.proc.CreateCursorResultSetInstruction.process(CreateCursorResultSetInstruction.java:65)
> at org.teiid.query.processor.proc.ProcedurePlan.processProcedure(ProcedurePlan.java:389)
> at org.teiid.query.processor.proc.ProcedurePlan.nextBatchDirect(ProcedurePlan.java:297)
> at org.teiid.query.processor.proc.ProcedurePlan.nextBatch(ProcedurePlan.java:269)
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:148)
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:111)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:160)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:142)
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:480)
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:350)
> 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, 7 months
[JBoss JIRA] (TEIID-5370) Allow TextTable to return Null for non-existent columns with specified Header
by dalex dalex (JIRA)
dalex dalex created TEIID-5370:
----------------------------------
Summary: Allow TextTable to return Null for non-existent columns with specified Header
Key: TEIID-5370
URL: https://issues.jboss.org/browse/TEIID-5370
Project: Teiid
Issue Type: Bug
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
Priority: Critical
In XmlTable we can have this:
{code:sql}
Begin
Declare xml ttab =
'<root>
<col1>1</col1>
<col2>2</col2>
</root>';
Select * From
XmlTable (
'/root'
Passing ttab
Columns
col1 string,
col2 string,
colNotExists string
) t;
End;;
{code}
and when a column doesn't exist in the xml it will be returned as null (colNotExists in the snippet above). The similar approach for TextTable will result in an error as this column indeed doesn't exist. I think, it may be useful, if the below snippet succeeds and returns nulls for non-existent cols (we encountered with a situation when we wanted to use TextTable in a dynamic way but it failed because of not existing cols):
{code:sql}
Begin
Declare clob ttab =
'col1,col2
1,2
one,two';
Select * From
TextTable (
ttab
Columns
col1 string,
col2 string,
colNotExists string
Delimiter ','
Header 1
) t;
End;;
{code}
What do you think?
At the moment the snippet above throws out the following error message:
{code:noformat}
2018-06-11 15:21:15,882 WARN [org.teiid.PROCESSOR] (Worker3_QueryProcessorQueue11) YTMw2kYFv3Cp TEIID30020 Processing exception for request YTMw2kYFv3Cp.4 'TEIID30181 HEADER entry m
issing for column name colNotExists in Unknown.'. Originally TeiidProcessingException TextTableNode.java:499.: org.teiid.core.TeiidProcessingException: TEIID30181 HEADER entry missin
g for column name colNotExists in Unknown.
at org.teiid.query.processor.relational.TextTableNode.processHeader(TextTableNode.java:499)
at org.teiid.query.processor.relational.TextTableNode.initReader(TextTableNode.java:471)
at org.teiid.query.processor.relational.TextTableNode.nextBatchDirect(TextTableNode.java:209)
at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:146)
at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:141)
at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:148)
at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:111)
at org.teiid.query.processor.BatchIterator.finalRow(BatchIterator.java:65)
at org.teiid.common.buffer.AbstractTupleSource.getCurrentTuple(AbstractTupleSource.java:66)
at org.teiid.query.processor.BatchIterator.getCurrentTuple(BatchIterator.java:80)
at org.teiid.common.buffer.AbstractTupleSource.hasNext(AbstractTupleSource.java:88)
at org.teiid.query.processor.proc.ProcedurePlan.executePlan(ProcedurePlan.java:612)
at org.teiid.query.processor.proc.CreateCursorResultSetInstruction.process(CreateCursorResultSetInstruction.java:65)
at org.teiid.query.processor.proc.ProcedurePlan.processProcedure(ProcedurePlan.java:389)
at org.teiid.query.processor.proc.ProcedurePlan.nextBatchDirect(ProcedurePlan.java:297)
at org.teiid.query.processor.proc.ProcedurePlan.nextBatch(ProcedurePlan.java:269)
at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:148)
at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:111)
at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:160)
at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:142)
at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:480)
at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:350)
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, 7 months
[JBoss JIRA] (TEIID-5363) SimpleDB connector not quoting table names in internal Select queries
by Pranav K (JIRA)
[ https://issues.jboss.org/browse/TEIID-5363?page=com.atlassian.jira.plugin... ]
Pranav K commented on TEIID-5363:
---------------------------------
Thanks Steve. But I am not really sure whether this workaround would solve the problem, looking at where exactly I am facing the issue. I am facing the issue in SimpleDBConnectionImpl.getAttributeNames. This method gets called from my class (which is similar to SimpleDBMetadataProcessor) with domain names which are obtained from a previous call SimpleDBConnectionImpl.getDomains (which returns non-quoted domain names). When this non-quoted domain name gets passed to getAttributeNames, it leads to a failure -- so when I essentially don't have the attributeNames yet, I can't quote them in the nameInSource property and proceed.
Here's the stacktrace for the error I am talking about:
Caused by: com.amazonaws.services.simpledb.model.InvalidQueryExpressionException: The specified query expression syntax is not valid. (Service: AmazonSimpl
eDB; Status Code: 400; Error Code: InvalidQueryExpression; Request ID: b8d60ae4-9488-6f0e-214c-da4ff404dbb3)
at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:1305)
at com.amazonaws.http.AmazonHttpClient.executeOneRequest(AmazonHttpClient.java:852)
at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:630)
at com.amazonaws.http.AmazonHttpClient.doExecute(AmazonHttpClient.java:405)
at com.amazonaws.http.AmazonHttpClient.executeWithTimer(AmazonHttpClient.java:367)
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:318)
at com.amazonaws.services.simpledb.AmazonSimpleDBClient.doInvoke(AmazonSimpleDBClient.java:1039)
at com.amazonaws.services.simpledb.AmazonSimpleDBClient.invoke(AmazonSimpleDBClient.java:1009)
at com.amazonaws.services.simpledb.AmazonSimpleDBClient.select(AmazonSimpleDBClient.java:958)
at org.teiid.resource.adapter.simpledb.SimpleDBConnectionImpl.getAttributeNames(SimpleDBConnectionImpl.java:90)
at com.test.simpledb.SimpleDBMetadataProvider.getColumnMetadata(SimpleDBMetadataProvider.java:100)
> SimpleDB connector not quoting table names in internal Select queries
> ---------------------------------------------------------------------
>
> Key: TEIID-5363
> URL: https://issues.jboss.org/browse/TEIID-5363
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Reporter: Pranav K
> Assignee: Steven Hawkins
> Fix For: 11.0, 10.3.2
>
>
> Facing an issue while querying the Simple DB connector for a specific type of tables - the tables that contain a hyphen in the name.
> According to the SimpleDB documentation:
> Attribute and domain names may appear without quotes if they contain only letters, numbers, underscores (_), or dollar symbols ($) and do not start with a number. You must quote all other attribute and domain names with the backtick (`).
> (https://docs.aws.amazon.com/AmazonSimpleDB/latest/DeveloperGuide/QuotingR...)
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 7 months
[JBoss JIRA] (TEIID-5083) Remove deprecated Salesforce API 22 access
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5083?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5083:
---------------------------------------
There are a couple of approaches here. The first is to move everything into the respective 34 version modules. The other is to move the 34 dependencies into the salesforce modules and to keep the old 34 modules around. I'll probably take the second approach as that seems the least breaking.
> Remove deprecated Salesforce API 22 access
> ------------------------------------------
>
> Key: TEIID-5083
> URL: https://issues.jboss.org/browse/TEIID-5083
> Project: Teiid
> Issue Type: Task
> Components: Salesforce Connector
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 11.0
>
>
> The deprecation notices were already added. The plan is to point the salesforce names to the 34 access instead.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 7 months