[JBoss JIRA] (TEIID-5369) enableDependentJoins for Redshift translator
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5369?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-5369:
----------------------------------
Component/s: JDBC Connector
Fix Version/s: 11.0
> enableDependentJoins for Redshift translator
> --------------------------------------------
>
> Key: TEIID-5369
> URL: https://issues.jboss.org/browse/TEIID-5369
> Project: Teiid
> Issue Type: Enhancement
> Components: JDBC Connector
> Reporter: Chandra Akkinepalli
> Assignee: Steven Hawkins
> Fix For: 11.0
>
>
> When using Translator overwrite property enableDependentJoins with Redshift translator, we got the following error.
> Caused by: java.sql.SQLException: [Amazon](500310) Invalid operation: CREATE TEMP TABLE ON COMMIT is not supported; at com.amazon.redshift.client.messages.inbound.ErrorResponse.toErrorException(ErrorResponse.java:1830) ... 30 lines omitted ... at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) Caused by: com.amazon.support.exceptions.ErrorException: [Amazon](500310) Invalid operation: CREATE TEMP TABLE ON COMMIT is not supported; ... 32 more
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 7 months
[JBoss JIRA] (TEIID-5369) enableDependentJoins for Redshift translator
by Chandra Akkinepalli (JIRA)
Chandra Akkinepalli created TEIID-5369:
------------------------------------------
Summary: enableDependentJoins for Redshift translator
Key: TEIID-5369
URL: https://issues.jboss.org/browse/TEIID-5369
Project: Teiid
Issue Type: Enhancement
Reporter: Chandra Akkinepalli
Assignee: Steven Hawkins
When using Translator overwrite property enableDependentJoins with Redshift translator, we got the following error.
Caused by: java.sql.SQLException: [Amazon](500310) Invalid operation: CREATE TEMP TABLE ON COMMIT is not supported; at com.amazon.redshift.client.messages.inbound.ErrorResponse.toErrorException(ErrorResponse.java:1830) ... 30 lines omitted ... at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) Caused by: com.amazon.support.exceptions.ErrorException: [Amazon](500310) Invalid operation: CREATE TEMP TABLE ON COMMIT is not supported; ... 32 more
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 7 months
[JBoss JIRA] (TEIID-5368) JSONTOXML fails on parsing too long numbers
by dalex dalex (JIRA)
[ https://issues.jboss.org/browse/TEIID-5368?page=com.atlassian.jira.plugin... ]
dalex dalex commented on TEIID-5368:
------------------------------------
[~shawkins] you're welcome! Thx for the quick fix.
> JSONTOXML fails on parsing too long numbers
> -------------------------------------------
>
> Key: TEIID-5368
> URL: https://issues.jboss.org/browse/TEIID-5368
> 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: Blocker
> Fix For: 11.0, 10.3.2, 10.2.3
>
>
> Running the following query:
> {code:noformat}
> select jsontoxml('root','{
> "items" : [{
> "ordernumber" : "NL0000026010",
> "orderdate" : "2016-01-01T01:13:39Z",
> "orderdate_ts" : "01-01-2016 01:13:39",
> "totalprice" : 24.8,
> "total_order_price" : 24.8,
> "vatvalue" : 4.3,
> "vatrate" : 21,
> "vatcustomernumber" : null,
> "odr_description" : null,
> "odr_note" : null,
> "rest_status" : "pending",
> "shipping_minimum_date" : null,
> "shipping_maximum_date" : null,
> "order_source" : "Magento",
> "oss_id" : 131458290409912116350633678684356778292}, {
> "ordernumber" : "NL0000026011",
> "orderdate" : "2016-01-01T06:52:05Z",
> "orderdate_ts" : "01-01-2016 06:52:05",
> "totalprice" : 27.85,
> "total_order_price" : 27.85,
> "vatvalue" : 4.84,
> "vatrate" : 21,
> "vatcustomernumber" : null,
> "odr_description" : null,
> "odr_note" : null,
> "rest_status" : "pending",
> "shipping_minimum_date" : null,
> "shipping_maximum_date" : null,
> "order_source" : "Magento",
> "oss_id" : 131458290409912116350633678684356778292
> }
> ],
> "hasMore" : true,
> "limit" : 10,
> "offset" : 0,
> "count" : 10
> }') ;;
> {code}
> fails with the following error message:
> {code:noformat}
> 15:30:44,531 WARN [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue5) p69Z3QNLg3hP TEIID30020 Processing exception for request p69Z3QNLg3hP.0 'TEIID30328 Unable to evaluate jsontoxml('root', ?): TEIID30384 Error while evaluating function jsontoxml'. Originally ExpressionEvaluationException 'For input string: "131458290409912116350633678684356778292"' NumberFormatException.java:65.: org.teiid.api.exception.query.ExpressionEvaluationException: TEIID30328 Unable to evaluate jsontoxml('root', ?): TEIID30384 Error while evaluating function jsontoxml
> at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:709)
> at org.teiid.query.rewriter.QueryRewriter.evaluate(QueryRewriter.java:2295)
> at org.teiid.query.rewriter.QueryRewriter.rewriteExpressionDirect(QueryRewriter.java:2285)
> at org.teiid.query.rewriter.QueryRewriter.access$000(QueryRewriter.java:105)
> at org.teiid.query.rewriter.QueryRewriter$2.replaceExpression(QueryRewriter.java:767)
> at org.teiid.query.sql.visitor.ExpressionMappingVisitor.visit(ExpressionMappingVisitor.java:158)
> at org.teiid.query.sql.symbol.ExpressionSymbol.acceptVisitor(ExpressionSymbol.java:59)
> 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:179)
> at org.teiid.query.sql.symbol.ExpressionSymbol.acceptVisitor(ExpressionSymbol.java:59)
> at org.teiid.query.sql.navigator.AbstractNavigator.visitNode(AbstractNavigator.java:59)
> at org.teiid.query.sql.navigator.AbstractNavigator.visitNodes(AbstractNavigator.java:72)
> at org.teiid.query.sql.navigator.PreOrPostOrderNavigator.visit(PreOrPostOrderNavigator.java:338)
> at org.teiid.query.sql.lang.Select.acceptVisitor(Select.java:164)
> at org.teiid.query.sql.navigator.PostOrderNavigator.doVisit(PostOrderNavigator.java:36)
> at org.teiid.query.rewriter.QueryRewriter.rewriteExpressions(QueryRewriter.java:774)
> at org.teiid.query.rewriter.QueryRewriter.rewriteQuery(QueryRewriter.java:559)
> at org.teiid.query.rewriter.QueryRewriter.rewriteCommand(QueryRewriter.java:269)
> at org.teiid.query.rewriter.QueryRewriter.rewrite(QueryRewriter.java:172)
> at org.teiid.query.rewriter.QueryRewriter.rewrite(QueryRewriter.java:176)
> at org.teiid.dqp.internal.process.Request.generatePlan(Request.java:436)
> 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)
> Caused by: org.teiid.api.exception.query.FunctionExecutionException: TEIID30384 Error while evaluating function jsontoxml
> at org.teiid.query.function.FunctionDescriptor.invokeFunction(FunctionDescriptor.java:289)
> at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:1309)
> at org.teiid.query.eval.Evaluator.internalEvaluate(Evaluator.java:741)
> at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:707)
> ... 32 more
> Caused by: java.lang.NumberFormatException: For input string: "131458290409912116350633678684356778292"
> at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
> at java.lang.Long.parseLong(Long.java:592)
> at java.lang.Long.valueOf(Long.java:803)
> at org.teiid.json.simple.Yylex.yylex(Yylex.java:662)
> at org.teiid.json.simple.JSONParser.nextToken(JSONParser.java:125)
> at org.teiid.json.simple.JSONParser.parse(JSONParser.java:257)
> at org.teiid.query.function.source.XMLSystemFunctions$JsonToXmlContentHandler.nextEvent(XMLSystemFunctions.java:354)
> at org.codehaus.stax2.ri.Stax2EventWriterImpl.add(Stax2EventWriterImpl.java:171)
> at org.teiid.query.function.source.XMLSystemFunctions$8.translate(XMLSystemFunctions.java:1012)
> at org.teiid.query.function.source.XMLSystemFunctions.saveToBufferManager(XMLSystemFunctions.java:1087)
> at org.teiid.query.function.source.XMLSystemFunctions.jsonToXml(XMLSystemFunctions.java:1003)
> at org.teiid.query.function.source.XMLSystemFunctions.jsonToXml(XMLSystemFunctions.java:983)
> at org.teiid.query.function.source.XMLSystemFunctions.jsonToXml(XMLSystemFunctions.java:979)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.teiid.query.function.FunctionDescriptor.invokeFunction(FunctionDescriptor.java:275)
> ... 35 more
> {code}
> I know that Teiid now contains totally json-simple library source code and the bug can be fixed quickly, something similar was reported here: https://github.com/fangyidong/json-simple/issues/57, later merged to https://github.com/fangyidong/json-simple/issues/73 issue but there is also another fork of the json-simple lib, here is the link: https://github.com/cliftonlabs/json-simple, author of the library claimed that he had already fixed the bug there, here is list of fixed bugs and features: https://cliftonlabs.github.io/json-simple/ but the main problem is that the forked library is not compatible anymore with original json-simple library but maybe we can take some changes from there to fix the original bug described here.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 7 months
[JBoss JIRA] (TEIID-5368) JSONTOXML fails on parsing too long numbers
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5368?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-5368.
-----------------------------------
Fix Version/s: 11.0
10.3.2
10.2.3
Resolution: Done
Thanks for bringing this to our attention. Updated the parser to use biginteger and bigdecimal when needed.
> JSONTOXML fails on parsing too long numbers
> -------------------------------------------
>
> Key: TEIID-5368
> URL: https://issues.jboss.org/browse/TEIID-5368
> 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: Blocker
> Fix For: 11.0, 10.3.2, 10.2.3
>
>
> Running the following query:
> {code:noformat}
> select jsontoxml('root','{
> "items" : [{
> "ordernumber" : "NL0000026010",
> "orderdate" : "2016-01-01T01:13:39Z",
> "orderdate_ts" : "01-01-2016 01:13:39",
> "totalprice" : 24.8,
> "total_order_price" : 24.8,
> "vatvalue" : 4.3,
> "vatrate" : 21,
> "vatcustomernumber" : null,
> "odr_description" : null,
> "odr_note" : null,
> "rest_status" : "pending",
> "shipping_minimum_date" : null,
> "shipping_maximum_date" : null,
> "order_source" : "Magento",
> "oss_id" : 131458290409912116350633678684356778292}, {
> "ordernumber" : "NL0000026011",
> "orderdate" : "2016-01-01T06:52:05Z",
> "orderdate_ts" : "01-01-2016 06:52:05",
> "totalprice" : 27.85,
> "total_order_price" : 27.85,
> "vatvalue" : 4.84,
> "vatrate" : 21,
> "vatcustomernumber" : null,
> "odr_description" : null,
> "odr_note" : null,
> "rest_status" : "pending",
> "shipping_minimum_date" : null,
> "shipping_maximum_date" : null,
> "order_source" : "Magento",
> "oss_id" : 131458290409912116350633678684356778292
> }
> ],
> "hasMore" : true,
> "limit" : 10,
> "offset" : 0,
> "count" : 10
> }') ;;
> {code}
> fails with the following error message:
> {code:noformat}
> 15:30:44,531 WARN [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue5) p69Z3QNLg3hP TEIID30020 Processing exception for request p69Z3QNLg3hP.0 'TEIID30328 Unable to evaluate jsontoxml('root', ?): TEIID30384 Error while evaluating function jsontoxml'. Originally ExpressionEvaluationException 'For input string: "131458290409912116350633678684356778292"' NumberFormatException.java:65.: org.teiid.api.exception.query.ExpressionEvaluationException: TEIID30328 Unable to evaluate jsontoxml('root', ?): TEIID30384 Error while evaluating function jsontoxml
> at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:709)
> at org.teiid.query.rewriter.QueryRewriter.evaluate(QueryRewriter.java:2295)
> at org.teiid.query.rewriter.QueryRewriter.rewriteExpressionDirect(QueryRewriter.java:2285)
> at org.teiid.query.rewriter.QueryRewriter.access$000(QueryRewriter.java:105)
> at org.teiid.query.rewriter.QueryRewriter$2.replaceExpression(QueryRewriter.java:767)
> at org.teiid.query.sql.visitor.ExpressionMappingVisitor.visit(ExpressionMappingVisitor.java:158)
> at org.teiid.query.sql.symbol.ExpressionSymbol.acceptVisitor(ExpressionSymbol.java:59)
> 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:179)
> at org.teiid.query.sql.symbol.ExpressionSymbol.acceptVisitor(ExpressionSymbol.java:59)
> at org.teiid.query.sql.navigator.AbstractNavigator.visitNode(AbstractNavigator.java:59)
> at org.teiid.query.sql.navigator.AbstractNavigator.visitNodes(AbstractNavigator.java:72)
> at org.teiid.query.sql.navigator.PreOrPostOrderNavigator.visit(PreOrPostOrderNavigator.java:338)
> at org.teiid.query.sql.lang.Select.acceptVisitor(Select.java:164)
> at org.teiid.query.sql.navigator.PostOrderNavigator.doVisit(PostOrderNavigator.java:36)
> at org.teiid.query.rewriter.QueryRewriter.rewriteExpressions(QueryRewriter.java:774)
> at org.teiid.query.rewriter.QueryRewriter.rewriteQuery(QueryRewriter.java:559)
> at org.teiid.query.rewriter.QueryRewriter.rewriteCommand(QueryRewriter.java:269)
> at org.teiid.query.rewriter.QueryRewriter.rewrite(QueryRewriter.java:172)
> at org.teiid.query.rewriter.QueryRewriter.rewrite(QueryRewriter.java:176)
> at org.teiid.dqp.internal.process.Request.generatePlan(Request.java:436)
> 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)
> Caused by: org.teiid.api.exception.query.FunctionExecutionException: TEIID30384 Error while evaluating function jsontoxml
> at org.teiid.query.function.FunctionDescriptor.invokeFunction(FunctionDescriptor.java:289)
> at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:1309)
> at org.teiid.query.eval.Evaluator.internalEvaluate(Evaluator.java:741)
> at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:707)
> ... 32 more
> Caused by: java.lang.NumberFormatException: For input string: "131458290409912116350633678684356778292"
> at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
> at java.lang.Long.parseLong(Long.java:592)
> at java.lang.Long.valueOf(Long.java:803)
> at org.teiid.json.simple.Yylex.yylex(Yylex.java:662)
> at org.teiid.json.simple.JSONParser.nextToken(JSONParser.java:125)
> at org.teiid.json.simple.JSONParser.parse(JSONParser.java:257)
> at org.teiid.query.function.source.XMLSystemFunctions$JsonToXmlContentHandler.nextEvent(XMLSystemFunctions.java:354)
> at org.codehaus.stax2.ri.Stax2EventWriterImpl.add(Stax2EventWriterImpl.java:171)
> at org.teiid.query.function.source.XMLSystemFunctions$8.translate(XMLSystemFunctions.java:1012)
> at org.teiid.query.function.source.XMLSystemFunctions.saveToBufferManager(XMLSystemFunctions.java:1087)
> at org.teiid.query.function.source.XMLSystemFunctions.jsonToXml(XMLSystemFunctions.java:1003)
> at org.teiid.query.function.source.XMLSystemFunctions.jsonToXml(XMLSystemFunctions.java:983)
> at org.teiid.query.function.source.XMLSystemFunctions.jsonToXml(XMLSystemFunctions.java:979)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.teiid.query.function.FunctionDescriptor.invokeFunction(FunctionDescriptor.java:275)
> ... 35 more
> {code}
> I know that Teiid now contains totally json-simple library source code and the bug can be fixed quickly, something similar was reported here: https://github.com/fangyidong/json-simple/issues/57, later merged to https://github.com/fangyidong/json-simple/issues/73 issue but there is also another fork of the json-simple lib, here is the link: https://github.com/cliftonlabs/json-simple, author of the library claimed that he had already fixed the bug there, here is list of fixed bugs and features: https://cliftonlabs.github.io/json-simple/ but the main problem is that the forked library is not compatible anymore with original json-simple library but maybe we can take some changes from there to fix the original bug described here.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 7 months
[JBoss JIRA] (TEIID-3439) Add support for aliases with .
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3439?page=com.atlassian.jira.plugin... ]
Steven Hawkins edited comment on TEIID-3439 at 6/8/18 11:00 AM:
----------------------------------------------------------------
Updated the logic to relax the parsing restriction and the sql string logic to support table aliases with .
This effectively gives 4 modes to the id parsing:
any id
short name, not an alias
short name alias
single identifier part - added as a post validation method
A known issue is that the logic can not distinguish between a fully qualified name and an alias with a ., for example:
{code}
select "pm1.g2".*, pm1.g2.* from pm1.g1 as "pm1.g2", pm1.g2
{code}
Results in a resolving exception. However
{code}
select "pm1.g2".* from pm1.g1 as "pm1.g2"
{code}
will resolve locally against the alias as expected and not produce an exception.
You can also do:
{code}
select pm1.g2.* from pm1.g1 as "pm1.g2"
{code}
which is not desirable, but mirrors our overall laxity in name resolution.
was (Author: shawkins):
Updated the logic to relax the parsing restriction and the sql string logic to support table aliases with .
This effectively gives 4 modes to the id parsing:
any id
short name, not an alias
short name alias
single identifier part - added as a post validation method
A known issue is that the logic can not distinguish between a fully qualified name and an alias with a ., for example:
select "pm1.g2".*, pm1.g2.* from pm1.g1 as "pm1.g2", pm1.g2
Results in a resolving exception. However
select "pm1.g2".* from pm1.g1 as "pm1.g2"
will resolve locally against the alias as expected and not produce an exception.
You can also do:
select pm1.g2.* from pm1.g1 as "pm1.g2"
which is not desirable, but mirrors our overall laxity in name resolution.
> Add support for aliases with .
> ------------------------------
>
> Key: TEIID-3439
> URL: https://issues.jboss.org/browse/TEIID-3439
> Project: Teiid
> Issue Type: Feature Request
> Components: Query Engine
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 11.0
>
>
> We currently don't allow column or table aliases to contain '.'. This is allowable given a quoted identifier is used. However an early design decision of metamatrix was to relax the rules of naming so that queries against the engine could use quoting (on not) similar to whatever was expected by a given database rather than the engine structure. A lot of resolving and parsing logic will need to change unfortunately to fix this.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 7 months
[JBoss JIRA] (TEIID-3439) Add support for aliases with .
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3439?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-3439.
-----------------------------------
Assignee: Steven Hawkins
Resolution: Done
Updated the logic to relax the parsing restriction and the sql string logic to support table aliases with .
This effectively gives 4 modes to the id parsing:
any id
short name, not an alias
short name alias
single identifier part - added as a post validation method
A known issue is that the logic can not distinguish between a fully qualified name and an alias with a ., for example:
select "pm1.g2".*, pm1.g2.* from pm1.g1 as "pm1.g2", pm1.g2
Results in a resolving exception. However
select "pm1.g2".* from pm1.g1 as "pm1.g2"
will resolve locally against the alias as expected and not produce an exception.
You can also do:
select pm1.g2.* from pm1.g1 as "pm1.g2"
which is not desirable, but mirrors our overall laxity in name resolution.
> Add support for aliases with .
> ------------------------------
>
> Key: TEIID-3439
> URL: https://issues.jboss.org/browse/TEIID-3439
> Project: Teiid
> Issue Type: Feature Request
> Components: Query Engine
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 11.0
>
>
> We currently don't allow column or table aliases to contain '.'. This is allowable given a quoted identifier is used. However an early design decision of metamatrix was to relax the rules of naming so that queries against the engine could use quoting (on not) similar to whatever was expected by a given database rather than the engine structure. A lot of resolving and parsing logic will need to change unfortunately to fix this.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 7 months