[JBoss JIRA] (TEIID-5725) Please improve documentation on definition of stored procedures, virtual functions and virtual procedures
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5725?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5725:
---------------------------------------
> For my understanding of the description a virtual procedure with side effects should always be mapped to an action.
Our notion of updating model count is unfortunately not the same as side-effect free. The value we compute is to determine whether a statement level transaction is required.
0 = no statement level transaction needed
1 = no statement level transaction needed if this is the only thing being called. Otherwise if it's nested in a procedure or there are other statements that may also need a transaction, then a statement level one will be started.
2 = always start a user level transaction
By the way we currently compute the value the usage of the atomic block means that we don't have to consider a higher level transaction as required for those statements - we'll create a block level transaction for that.
So to have the same semantics as OData is looking for we would need a secondary check.
Another thing to consider is if you even need an atomic block. Are you worried about a competing update to NutritionGoal in between the select and update?
> I do not understand than why there is a virtual function and virtual procedure specification. I would have expected to get a function for a virtual function and a action for a virtual procedure.
It is not necessarily intended that virtual functions are represented in OData metadata at all. The only reason they are there is because when they are defined by a DDL procedure body there is procedure in our system metadata. When the OData metadata is built it is looking at procedures only - note that source functions, Teiid system functions, etc. are not represented in the OData metadata. I would like this to be more consistent than it is. In general the mapping of function to function, and procedure to action is simpler - except not all Teiid functions qualify as OData functions as they can have lob parameters and side-effects. Ramesh would have to comment more on this as he did the initial metadata mapping - [~rareddy] did you ever intend to have all Teiid functions represented in OData? Perhaps as composible?
> Maybe you could also add the options to an example in the documentation to make it transparent? Would this than be OPTIONS(UPDATECOUNT '1');
Yes that is the workaround in this case if you want it as an action. More than likely though we'd want the semantics of "side effect free" to be represented rather than documenting this as a corner case. Can you log an issue about this?
> By the way, if you see how I could write this function more efficiently, I would be grateful for a comment
You could combine both of the selects, and you may find it easier to read using a loop rather than a lot of scalar subqueries:
CREATE VIRTUAL PROCEDURE copyNutritionGoalsOfWeekdayToEntireWeek(vWeekday VARCHAR(1))
RETURNS BOOLEAN AS
BEGIN ATOMIC
IF ( vWeekday NOT IN ('0', '1', '2', '3', '4', '5', '6') )
RETURN FALSE;
--##### read the relevant parameters of the selected workday into a temporary table #####
SELECT
fkProfile, BMR_Formula, BMR_Value, ActivityLevel, CaloriesBurned, WeekGoal, GoalCaloriesDelta,
CarbsGoalInPercent, ProteinsGoalInPercent, FatGoalInPercent
INTO
#tmpTable
FROM
NutritionGoal
WHERE
fkProfile = (SELECT Account.idProfile FROM Account WHERE Account.uuidUser = LEFT(user(), 36)) AND Weekday = vWeekday;
IF (ROWCOUNT = 0)
RETURN FALSE;
--##### update the other weekdays #####
LOOP ON (SELECT * FROM #tmpTable) as cur
BEGIN
UPDATE
NutritionGoal
SET
NutritionGoal.BMR_Formula = cur.BMR_Formula,
NutritionGoal.BMR_Value = cur.BMR_Value,
NutritionGoal.ActivityLevel = cur.ActivityLevel,
NutritionGoal.CaloriesBurned = cur.CaloriesBurned,
NutritionGoal.WeekGoal = cur.WeekGoal,
NutritionGoal.GoalCaloriesDelta = cur.GoalCaloriesDelta,
NutritionGoal.CarbsGoalInPercent = cur.CarbsGoalInPercent,
NutritionGoal.ProteinsGoalInPercent = cur.ProteinsGoalInPercent,
NutritionGoal.FatGoalInPercent = cur.FatGoalInPercent
WHERE
NutritionGoal.fkProfile = cur.vfkProfile AND NutritionGoal.Weekday != vWeekday;
END
RETURN TRUE;
END
> Please improve documentation on definition of stored procedures, virtual functions and virtual procedures
> ---------------------------------------------------------------------------------------------------------
>
> Key: TEIID-5725
> URL: https://issues.jboss.org/browse/TEIID-5725
> Project: Teiid
> Issue Type: Enhancement
> Components: Documentation
> Reporter: Christoph John
> Assignee: Steven Hawkins
> Priority: Critical
>
> I refer to the discussion with Ramesh in
> https://developer.jboss.org/message/989048#989048 and would like to ask for a more detailed explanation on how to write virtual procedures and functions.
> -Especially, how are OUT and INOUT params set and how can they be obtained via odata.
> - How is the return value of a virtual function set?
> - How are collections and arrays of collections returned?
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 8 months
[JBoss JIRA] (TEIID-5725) Please improve documentation on definition of stored procedures, virtual functions and virtual procedures
by Christoph John (Jira)
[ https://issues.jboss.org/browse/TEIID-5725?page=com.atlassian.jira.plugin... ]
Christoph John edited comment on TEIID-5725 at 4/24/19 5:05 PM:
----------------------------------------------------------------
Hello Steven, thanks this helps a lot. However, reading through your description resulted in a further question. I am not sure if I might came over a further issue with it or if I simply have a bug in my procedure.
For my understanding of the description a virtual procedure with side effects should always be mapped to an action. However, the following is my virtual procedure and it is mapped to a function
CREATE VIRTUAL PROCEDURE copyNutritionGoalsOfWeekdayToEntireWeek(vWeekday VARCHAR(1))
RETURNS BOOLEAN AS
BEGIN ATOMIC
IF ( vWeekday IN ('0', '1', '2', '3', '4', '5', '6') )
BEGIN
DECLARE LONG vfkProfile = SELECT Account.idProfile FROM Account WHERE Account.uuidUser = LEFT(user(), 36);
--##### read the relevant parameters of the selected workday into a temporary table #####
SELECT
BMR_Formula, BMR_Value, ActivityLevel, CaloriesBurned, WeekGoal, GoalCaloriesDelta,
CarbsGoalInPercent, ProteinsGoalInPercent, FatGoalInPercent
INTO
#tmpTable
FROM
NutritionGoal
WHERE
fkProfile = vfkProfile AND Weekday = vWeekday;
--##### update the other weekdays #####
UPDATE
NutritionGoal
SET
NutritionGoal.BMR_Formula = (SELECT BMR_Formula FROM #tmpTable),
NutritionGoal.BMR_Value = (SELECT BMR_Value FROM #tmpTable),
NutritionGoal.ActivityLevel = (SELECT ActivityLevel FROM #tmpTable),
NutritionGoal.CaloriesBurned = (SELECT CaloriesBurned FROM #tmpTable),
NutritionGoal.WeekGoal = (SELECT WeekGoal FROM #tmpTable),
NutritionGoal.GoalCaloriesDelta = (SELECT GoalCaloriesDelta FROM #tmpTable),
NutritionGoal.CarbsGoalInPercent = (SELECT CarbsGoalInPercent FROM #tmpTable),
NutritionGoal.ProteinsGoalInPercent = (SELECT ProteinsGoalInPercent FROM #tmpTable),
NutritionGoal.FatGoalInPercent = (SELECT FatGoalInPercent FROM #tmpTable)
WHERE
NutritionGoal.fkProfile = vfkProfile AND NutritionGoal.Weekday != vWeekday;
RETURN TRUE;
END
RETURN FALSE;
END
By the way, if you see how I could write this function more efficiently, I would be grateful for a comment :) The function parameter is an enum in the underlaying db. But enum seems to be not supported in teiid.
According to your description:
The procedure/function is side effect free - this is determined by the inferred or explicit value of 0 for the model update count
So do I need to add options to my procedure than. I do not understand than why there is a virtual function and virtual procedure specification. I would have expected to get a function for a virtual function and a action for a virtual procedure.
Maybe you could also add the options to an example in the documentation to make it transparent? Would this than be OPTIONS(UPDATECOUNT '1'); ?
was (Author: cjohn001):
Hello Steven, thanks this helps a lot. However, reading through your description resulted in a further question. I am not sure if I might came over a further issue with it or if I simply have a bug in my procedure.
For my understanding of the description a virtual procedure with side effects should always be mapped to an action. However, the following is my virtual procedure and it is mapped to a function
CREATE VIRTUAL PROCEDURE copyNutritionGoalsOfWeekdayToEntireWeek(vWeekday VARCHAR(1))
RETURNS BOOLEAN AS
BEGIN ATOMIC
IF ( vWeekday IN ('0', '1', '2', '3', '4', '5', '6') )
BEGIN
DECLARE LONG vfkProfile = SELECT Account.idProfile FROM Account WHERE Account.uuidUser = LEFT(user(), 36);
--##### read the relevant parameters of the selected workday into a temporary table #####
SELECT
BMR_Formula, BMR_Value, ActivityLevel, CaloriesBurned, WeekGoal, GoalCaloriesDelta,
CarbsGoalInPercent, ProteinsGoalInPercent, FatGoalInPercent
INTO
#tmpTable
FROM
NutritionGoal
WHERE
fkProfile = vfkProfile AND Weekday = vWeekday;
--##### update the other weekdays #####
UPDATE
NutritionGoal
SET
NutritionGoal.BMR_Formula = (SELECT BMR_Formula FROM #tmpTable),
NutritionGoal.BMR_Value = (SELECT BMR_Value FROM #tmpTable),
NutritionGoal.ActivityLevel = (SELECT ActivityLevel FROM #tmpTable),
NutritionGoal.CaloriesBurned = (SELECT CaloriesBurned FROM #tmpTable),
NutritionGoal.WeekGoal = (SELECT WeekGoal FROM #tmpTable),
NutritionGoal.GoalCaloriesDelta = (SELECT GoalCaloriesDelta FROM #tmpTable),
NutritionGoal.CarbsGoalInPercent = (SELECT CarbsGoalInPercent FROM #tmpTable),
NutritionGoal.ProteinsGoalInPercent = (SELECT ProteinsGoalInPercent FROM #tmpTable),
NutritionGoal.FatGoalInPercent = (SELECT FatGoalInPercent FROM #tmpTable)
WHERE
NutritionGoal.fkProfile = vfkProfile AND NutritionGoal.Weekday != vWeekday;
RETURN TRUE;
END
RETURN FALSE;
END
By the way, if you see how I could write this function more efficiently, I would be grateful for a comment :)
According to your description:
The procedure/function is side effect free - this is determined by the inferred or explicit value of 0 for the model update count
So do I need to add options to my procedure than. I do not understand than why there is a virtual function and virtual procedure specification. I would have expected to get a function for a virtual function and a action for a virtual procedure.
Maybe you could also add the options to an example in the documentation to make it transparent? Would this than be OPTIONS(UPDATECOUNT '1'); ?
> Please improve documentation on definition of stored procedures, virtual functions and virtual procedures
> ---------------------------------------------------------------------------------------------------------
>
> Key: TEIID-5725
> URL: https://issues.jboss.org/browse/TEIID-5725
> Project: Teiid
> Issue Type: Enhancement
> Components: Documentation
> Reporter: Christoph John
> Assignee: Steven Hawkins
> Priority: Critical
>
> I refer to the discussion with Ramesh in
> https://developer.jboss.org/message/989048#989048 and would like to ask for a more detailed explanation on how to write virtual procedures and functions.
> -Especially, how are OUT and INOUT params set and how can they be obtained via odata.
> - How is the return value of a virtual function set?
> - How are collections and arrays of collections returned?
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 8 months
[JBoss JIRA] (TEIID-5725) Please improve documentation on definition of stored procedures, virtual functions and virtual procedures
by Christoph John (Jira)
[ https://issues.jboss.org/browse/TEIID-5725?page=com.atlassian.jira.plugin... ]
Christoph John commented on TEIID-5725:
---------------------------------------
Hello Steven, thanks this helps a lot. However, reading through your description resulted in a further question. I am not sure if I might came over a further issue with it or if I simply have a bug in my procedure.
For my understanding of the description a virtual procedure with side effects should always be mapped to an action. However, the following is my virtual procedure and it is mapped to a function
CREATE VIRTUAL PROCEDURE copyNutritionGoalsOfWeekdayToEntireWeek(vWeekday VARCHAR(1))
RETURNS BOOLEAN AS
BEGIN ATOMIC
IF ( vWeekday IN ('0', '1', '2', '3', '4', '5', '6') )
BEGIN
DECLARE LONG vfkProfile = SELECT Account.idProfile FROM Account WHERE Account.uuidUser = LEFT(user(), 36);
--##### read the relevant parameters of the selected workday into a temporary table #####
SELECT
BMR_Formula, BMR_Value, ActivityLevel, CaloriesBurned, WeekGoal, GoalCaloriesDelta,
CarbsGoalInPercent, ProteinsGoalInPercent, FatGoalInPercent
INTO
#tmpTable
FROM
NutritionGoal
WHERE
fkProfile = vfkProfile AND Weekday = vWeekday;
--##### update the other weekdays #####
UPDATE
NutritionGoal
SET
NutritionGoal.BMR_Formula = (SELECT BMR_Formula FROM #tmpTable),
NutritionGoal.BMR_Value = (SELECT BMR_Value FROM #tmpTable),
NutritionGoal.ActivityLevel = (SELECT ActivityLevel FROM #tmpTable),
NutritionGoal.CaloriesBurned = (SELECT CaloriesBurned FROM #tmpTable),
NutritionGoal.WeekGoal = (SELECT WeekGoal FROM #tmpTable),
NutritionGoal.GoalCaloriesDelta = (SELECT GoalCaloriesDelta FROM #tmpTable),
NutritionGoal.CarbsGoalInPercent = (SELECT CarbsGoalInPercent FROM #tmpTable),
NutritionGoal.ProteinsGoalInPercent = (SELECT ProteinsGoalInPercent FROM #tmpTable),
NutritionGoal.FatGoalInPercent = (SELECT FatGoalInPercent FROM #tmpTable)
WHERE
NutritionGoal.fkProfile = vfkProfile AND NutritionGoal.Weekday != vWeekday;
RETURN TRUE;
END
RETURN FALSE;
END
By the way, if you see how I could write this function more efficiently, I would be grateful for a comment :)
According to your description:
The procedure/function is side effect free - this is determined by the inferred or explicit value of 0 for the model update count
So do I need to add options to my procedure than. I do not understand than why there is a virtual function and virtual procedure specification. I would have expected to get a function for a virtual function and a action for a virtual procedure.
Maybe you could also add the options to an example in the documentation to make it transparent? Would this than be OPTIONS(UPDATECOUNT '1'); ?
> Please improve documentation on definition of stored procedures, virtual functions and virtual procedures
> ---------------------------------------------------------------------------------------------------------
>
> Key: TEIID-5725
> URL: https://issues.jboss.org/browse/TEIID-5725
> Project: Teiid
> Issue Type: Enhancement
> Components: Documentation
> Reporter: Christoph John
> Assignee: Steven Hawkins
> Priority: Critical
>
> I refer to the discussion with Ramesh in
> https://developer.jboss.org/message/989048#989048 and would like to ask for a more detailed explanation on how to write virtual procedures and functions.
> -Especially, how are OUT and INOUT params set and how can they be obtained via odata.
> - How is the return value of a virtual function set?
> - How are collections and arrays of collections returned?
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 8 months
[JBoss JIRA] (TEIID-5728) JSON production functions JSONOBJECT and JSONARRAY_AGG producing CLOBs
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5728?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-5728.
-----------------------------------
Fix Version/s: 12.2
Resolution: Done
Corrected the types from clob to json.
> JSON production functions JSONOBJECT and JSONARRAY_AGG producing CLOBs
> ----------------------------------------------------------------------
>
> Key: TEIID-5728
> URL: https://issues.jboss.org/browse/TEIID-5728
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Reporter: Ramesh Reddy
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 12.2
>
>
> JSON production functions like JSONOBJECT and JSONARRAY_AGG seem to be still returning a clob object rather than a 'json' object even though Teiid has the first class data type for json now.
> for ex:
> {code}
> CREATE VIRTUAL PROCEDURE CustomerJSON(IN p1 integer) RETURNS TABLE (json_out json)
> OPTIONS (UPDATECOUNT 0, "REST:METHOD" 'GET', "REST:URI" 'CustomerJson/{p1}') AS
> BEGIN
> SELECT JSONOBJECT(JSONARRAY_AGG(JSONOBJECT(SSN, Name))) AS json_out FROM accounts.customer;
> END
> {code}
> would fail with
> {code}
> Caused by: org.teiid.deployers.VirtualDatabaseException: TEIID40095 TEIID31080 virt.CustomerJSON validation error: TEIID31121 The expected result set of the procedure virt.CustomerJSON does not match the result set from returnable statement SELECT JSONOBJECT(JSONARRAY_AGG(JSONOBJECT(SSN, Name))) AS json_out FROM accounts.customer; use WITHOUT RETURN to indicate the statement should not be returned - The definition for virt.CustomerJSON has the wrong type for column 1. Expected json, but was clob.
> at org.teiid.runtime.EmbeddedServer.deployVDB(EmbeddedServer.java:845) ~[teiid-runtime-12.2.0-SNAPSHOT.jar:12.2.0-SNAPSHOT]
> at org.teiid.spring.autoconfigure.TeiidServer.deployVDB(TeiidServer.java:315) ~[classes/:na]
> ... 17 common frames omitted
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 8 months
[JBoss JIRA] (TEIID-5728) JSON production functions JSONOBJECT and JSONARRAY_AGG producing CLOBs
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5728?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-5728:
----------------------------------
Component/s: Query Engine
> JSON production functions JSONOBJECT and JSONARRAY_AGG producing CLOBs
> ----------------------------------------------------------------------
>
> Key: TEIID-5728
> URL: https://issues.jboss.org/browse/TEIID-5728
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Reporter: Ramesh Reddy
> Assignee: Steven Hawkins
> Priority: Major
>
> JSON production functions like JSONOBJECT and JSONARRAY_AGG seem to be still returning a clob object rather than a 'json' object even though Teiid has the first class data type for json now.
> for ex:
> {code}
> CREATE VIRTUAL PROCEDURE CustomerJSON(IN p1 integer) RETURNS TABLE (json_out json)
> OPTIONS (UPDATECOUNT 0, "REST:METHOD" 'GET', "REST:URI" 'CustomerJson/{p1}') AS
> BEGIN
> SELECT JSONOBJECT(JSONARRAY_AGG(JSONOBJECT(SSN, Name))) AS json_out FROM accounts.customer;
> END
> {code}
> would fail with
> {code}
> Caused by: org.teiid.deployers.VirtualDatabaseException: TEIID40095 TEIID31080 virt.CustomerJSON validation error: TEIID31121 The expected result set of the procedure virt.CustomerJSON does not match the result set from returnable statement SELECT JSONOBJECT(JSONARRAY_AGG(JSONOBJECT(SSN, Name))) AS json_out FROM accounts.customer; use WITHOUT RETURN to indicate the statement should not be returned - The definition for virt.CustomerJSON has the wrong type for column 1. Expected json, but was clob.
> at org.teiid.runtime.EmbeddedServer.deployVDB(EmbeddedServer.java:845) ~[teiid-runtime-12.2.0-SNAPSHOT.jar:12.2.0-SNAPSHOT]
> at org.teiid.spring.autoconfigure.TeiidServer.deployVDB(TeiidServer.java:315) ~[classes/:na]
> ... 17 common frames omitted
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 8 months
[JBoss JIRA] (TEIID-5728) JSON production functions JSONOBJECT and JSONARRAY_AGG producing CLOBs
by Ramesh Reddy (Jira)
Ramesh Reddy created TEIID-5728:
-----------------------------------
Summary: JSON production functions JSONOBJECT and JSONARRAY_AGG producing CLOBs
Key: TEIID-5728
URL: https://issues.jboss.org/browse/TEIID-5728
Project: Teiid
Issue Type: Bug
Reporter: Ramesh Reddy
Assignee: Steven Hawkins
JSON production functions like JSONOBJECT and JSONARRAY_AGG seem to be still returning a clob object rather than a 'json' object even though Teiid has the first class data type for json now.
for ex:
{code}
CREATE VIRTUAL PROCEDURE CustomerJSON(IN p1 integer) RETURNS TABLE (json_out json)
OPTIONS (UPDATECOUNT 0, "REST:METHOD" 'GET', "REST:URI" 'CustomerJson/{p1}') AS
BEGIN
SELECT JSONOBJECT(JSONARRAY_AGG(JSONOBJECT(SSN, Name))) AS json_out FROM accounts.customer;
END
{code}
would fail with
{code}
Caused by: org.teiid.deployers.VirtualDatabaseException: TEIID40095 TEIID31080 virt.CustomerJSON validation error: TEIID31121 The expected result set of the procedure virt.CustomerJSON does not match the result set from returnable statement SELECT JSONOBJECT(JSONARRAY_AGG(JSONOBJECT(SSN, Name))) AS json_out FROM accounts.customer; use WITHOUT RETURN to indicate the statement should not be returned - The definition for virt.CustomerJSON has the wrong type for column 1. Expected json, but was clob.
at org.teiid.runtime.EmbeddedServer.deployVDB(EmbeddedServer.java:845) ~[teiid-runtime-12.2.0-SNAPSHOT.jar:12.2.0-SNAPSHOT]
at org.teiid.spring.autoconfigure.TeiidServer.deployVDB(TeiidServer.java:315) ~[classes/:na]
... 17 common frames omitted
{code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 8 months
[JBoss JIRA] (TEIID-5725) Please improve documentation on definition of stored procedures, virtual functions and virtual procedures
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5725?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5725:
---------------------------------------
> How would this have to look like? Lets assume the scenario where a user should be able to call a virtual procedure which than calls a stored procedure. Further, the user should not be able to call the stored procedure directly.
If a user calls now calls the virtual procedure, would he than not need to have the same role assigned that is required to execute the stored procedure directly?
I realized that you had a dangling question of the usage of data roles. Data roles for access are enforced at the top level of user query. If the user has execute permission on the virtual procedure, that is all that is required. Masking and row level security is applied transitively. See http://teiid.github.io/teiid-documents/master/content/reference/Permissio...
> Please improve documentation on definition of stored procedures, virtual functions and virtual procedures
> ---------------------------------------------------------------------------------------------------------
>
> Key: TEIID-5725
> URL: https://issues.jboss.org/browse/TEIID-5725
> Project: Teiid
> Issue Type: Enhancement
> Reporter: Christoph John
> Assignee: Steven Hawkins
> Priority: Critical
>
> I refer to the discussion with Ramesh in
> https://developer.jboss.org/message/989048#989048 and would like to ask for a more detailed explanation on how to write virtual procedures and functions.
> -Especially, how are OUT and INOUT params set and how can they be obtained via odata.
> - How is the return value of a virtual function set?
> - How are collections and arrays of collections returned?
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 8 months
[JBoss JIRA] (TEIID-5720) PSQL client fails to report the metadata
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5720?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5720:
---------------------------------------
For reference the describe source: https://github.com/postgres/postgres/blob/421a2c48328c88eb31f6b29979218f0...
> PSQL client fails to report the metadata
> ----------------------------------------
>
> Key: TEIID-5720
> URL: https://issues.jboss.org/browse/TEIID-5720
> Project: Teiid
> Issue Type: Bug
> Components: ODBC
> Reporter: Ramesh Reddy
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 12.2
>
>
> When using psql client and issuing the "\dt" command I see this exception instead of returning the table names.
> {code}
> WARN: TEIID30020 Processing exception for request grF9mx6fyMfD.1 'TEIID30082 Expected value of type 'char' but '''' is of type 'string' and no implicit conversion is available.'. Originally QueryResolverException ResolverUtil.java:230.
> org.teiid.api.exception.query.QueryResolverException: TEIID30082 Expected value of type 'char' but '''' is of type 'string' and no implicit conversion is available.
> at org.teiid.query.resolver.util.ResolverUtil.convertExpression(ResolverUtil.java:230)
> at org.teiid.query.resolver.util.ResolverVisitor.resolveSetCriteria(ResolverVisitor.java:1203)
> at org.teiid.query.resolver.util.ResolverVisitor.visit(ResolverVisitor.java:294)
> at org.teiid.query.sql.lang.SetCriteria.acceptVisitor(SetCriteria.java:96)
> 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.resolver.command.SimpleQueryResolver$QueryResolverVisitor.postVisitVisitor(SimpleQueryResolver.java:229)
> at org.teiid.query.sql.navigator.PreOrPostOrderNavigator.visit(PreOrPostOrderNavigator.java:345)
> at org.teiid.query.sql.lang.SetCriteria.acceptVisitor(SetCriteria.java:96)
> 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:135)
> at org.teiid.query.sql.lang.CompoundCriteria.acceptVisitor(CompoundCriteria.java:231)
> at org.teiid.query.sql.navigator.AbstractNavigator.visitNode(AbstractNavigator.java:59)
> at org.teiid.query.resolver.command.SimpleQueryResolver$QueryResolverVisitor.visit(SimpleQueryResolver.java:244)
> at org.teiid.query.resolver.command.SimpleQueryResolver.resolveCommand(SimpleQueryResolver.java:66)
> at org.teiid.query.resolver.QueryResolver.resolveCommand(QueryResolver.java:178)
> at org.teiid.query.resolver.QueryResolver.resolveCommand(QueryResolver.java:120)
> at org.teiid.dqp.internal.process.Request.resolveCommand(Request.java:282)
> at org.teiid.dqp.internal.process.Request.generatePlan(Request.java:418)
> 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:43)
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:285)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:281)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:124)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$2.run(ThreadReuseExecutor.java:212)
> at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
> at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
> at java.base/java.lang.Thread.run(Thread.java:834)
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 8 months