[JBoss JIRA] (TEIID-4321) VDB Validation is showing warnings, but failing deployment
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4321?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-4321.
-----------------------------------
Fix Version/s: 9.1
9.0.2
Resolution: Done
Used a simpler version of the earlier comment to check both the columns and the types.
> VDB Validation is showing warnings, but failing deployment
> ----------------------------------------------------------
>
> Key: TEIID-4321
> URL: https://issues.jboss.org/browse/TEIID-4321
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 9.x
> Reporter: Van Halbert
> Assignee: Steven Hawkins
> Fix For: 9.1, 9.0.2
>
>
> The deployment of a vdb is failing due to 2 warnings:
> 13:29:01,076 WARN [org.teiid.PLANNER.RESOLVER] (Worker2_async-teiid-threads4) TEIID31193 Table Persons columns size not same as Materialized View {1}s columns size
> 13:29:01,077 WARN [org.teiid.PLANNER.RESOLVER] (Worker2_async-teiid-threads4) TEIID31194 Column PersonObject in Table Person and Column name in Materialized View PersonMatView should have same type
> 13:29:01,080 INFO [org.teiid.RUNTIME] (Worker2_async-teiid-threads4) TEIID40073 The metadata for the VDB PeopleMat.1 is loaded, however it is not valid. Check models for errors. Correct the metadata and re-deploy.
> 13:29:01,080 INFO [org.teiid.RUNTIME.VDBLifeCycleListener] (Worker2_async-teiid-threads4) TEIID40003 VDB PeopleMat.1 is set to FAILED
> I changed the MetadataValidator class to remove the warnings and the VDB deployed ok. If an issue is going to fail deployment, shouldn't it be on an ERROR?
> Regarding the warnings:
> 1. regarding column size, is it required that all columns in the materialized table to be writable?
> 2. the 2nd warning was due to the 1st warning.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 5 months
[JBoss JIRA] (TEIID-4321) VDB Validation is showing warnings, but failing deployment
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-4321?page=com.atlassian.jira.plugin... ]
Van Halbert commented on TEIID-4321:
------------------------------------
how's this:
{code}
List<Column> matViewColumns = matTable.getColumns();
List<Column> tableColumns = table.getColumns();
// the table must have at least the same number of columns as the matview
if(matViewColumns.size() > tableColumns.size()) {
metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31193, table.getName(), matTable.getName()));
}
for (Column mc : matViewColumns) {
Column tc = table.getColumnByName(mc.getName());
if (tc == null) {
metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31203, mc.getName(), matTable.getName(), table.getName()));
}
if(!mc.getDatatypeUUID().equals(tc.getDatatypeUUID())){
metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31194, tc.getName(), table.getName(), mc.getName(), matTable.getName()));
}
}
}
TEIID31193=Table {0}'s columns size is smaller than the Materialized View {1}'s columns size
TEIID31203=Column {0} in Materialized View {1} was not found in table {2}
{code}
> VDB Validation is showing warnings, but failing deployment
> ----------------------------------------------------------
>
> Key: TEIID-4321
> URL: https://issues.jboss.org/browse/TEIID-4321
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 9.x
> Reporter: Van Halbert
> Assignee: Steven Hawkins
>
> The deployment of a vdb is failing due to 2 warnings:
> 13:29:01,076 WARN [org.teiid.PLANNER.RESOLVER] (Worker2_async-teiid-threads4) TEIID31193 Table Persons columns size not same as Materialized View {1}s columns size
> 13:29:01,077 WARN [org.teiid.PLANNER.RESOLVER] (Worker2_async-teiid-threads4) TEIID31194 Column PersonObject in Table Person and Column name in Materialized View PersonMatView should have same type
> 13:29:01,080 INFO [org.teiid.RUNTIME] (Worker2_async-teiid-threads4) TEIID40073 The metadata for the VDB PeopleMat.1 is loaded, however it is not valid. Check models for errors. Correct the metadata and re-deploy.
> 13:29:01,080 INFO [org.teiid.RUNTIME.VDBLifeCycleListener] (Worker2_async-teiid-threads4) TEIID40003 VDB PeopleMat.1 is set to FAILED
> I changed the MetadataValidator class to remove the warnings and the VDB deployed ok. If an issue is going to fail deployment, shouldn't it be on an ERROR?
> Regarding the warnings:
> 1. regarding column size, is it required that all columns in the materialized table to be writable?
> 2. the 2nd warning was due to the 1st warning.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 5 months
[JBoss JIRA] (TEIID-3866) with clause used by subquery repeated in the subquery
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3866?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-3866.
-----------------------------------
Resolution: Done
> with clause used by subquery repeated in the subquery
> -----------------------------------------------------
>
> Key: TEIID-3866
> URL: https://issues.jboss.org/browse/TEIID-3866
> Project: Teiid
> Issue Type: Quality Risk
> Components: Query Engine
> Affects Versions: 8.7
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 8.7.8.6_2, 8.12.4, 8.13
>
>
> A query such as:
> with eee as (select * from pm1.g1) select * from pm1.g2 where pm1.g2.e1 in (select e1 from eee)
> will result in a push down that repeats the with clause in the subquery:
> ... (with eee ... select e1 from eee)
> It is sufficient to rely on the parent to define the common table.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 5 months
[JBoss JIRA] (TEIID-4321) VDB Validation is showing warnings, but failing deployment
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4321?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-4321:
---------------------------------------
> I changed the MetadataValidator class to remove the warnings and the VDB deployed ok. If an issue is going to fail deployment, shouldn't it be on an ERROR?
Actually no. ERROR logging is only for unexpected errors. Expected errors from user events are logged at a WARN level (otherwise it's very easy to fill up the logs with a failing query for example). If you want to make the case that this is an administrative operation and should logged at a higher level, then that could be considered.
> 1. regarding column size, is it required that all columns in the materialized table to be writable?
No. However updatablity of the matview doesn't correlate to a consideration about the materialization table.
Here is what I would do for a change:
- only check for fewer columns in the materialization table as that is obviously an issue
- and as you have done don't require columns to be positionally the same
{code}
List<Column> matViewColumns = view.getColumns();
List<Column> tableColumns = table.getColumns();
if(tableColumns.size() < matViewColumns.size()) {
metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31193, table.getFullName(), view.getFullName()));
} else {
for(int i = 0 ; i < matViewColumns.size() ; i ++) {
Column matViewColumn = matViewColumns.get(i);
Column tableColumn = table.getColumnByName(matViewColumn.getName());
if (tableColumn == null) {
metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31203, table.getFullName(), matViewColumn.getName(), view.getFullName()));
} else if(!matViewColumn.getDatatypeUUID().equals(tableColumn.getDatatypeUUID())){
metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31194, tableColumn.getName(), table.getFullName(), matViewColumn.getName(), view.getFullName()));
}
}
}
{code}
> VDB Validation is showing warnings, but failing deployment
> ----------------------------------------------------------
>
> Key: TEIID-4321
> URL: https://issues.jboss.org/browse/TEIID-4321
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 9.x
> Reporter: Van Halbert
> Assignee: Steven Hawkins
>
> The deployment of a vdb is failing due to 2 warnings:
> 13:29:01,076 WARN [org.teiid.PLANNER.RESOLVER] (Worker2_async-teiid-threads4) TEIID31193 Table Persons columns size not same as Materialized View {1}s columns size
> 13:29:01,077 WARN [org.teiid.PLANNER.RESOLVER] (Worker2_async-teiid-threads4) TEIID31194 Column PersonObject in Table Person and Column name in Materialized View PersonMatView should have same type
> 13:29:01,080 INFO [org.teiid.RUNTIME] (Worker2_async-teiid-threads4) TEIID40073 The metadata for the VDB PeopleMat.1 is loaded, however it is not valid. Check models for errors. Correct the metadata and re-deploy.
> 13:29:01,080 INFO [org.teiid.RUNTIME.VDBLifeCycleListener] (Worker2_async-teiid-threads4) TEIID40003 VDB PeopleMat.1 is set to FAILED
> I changed the MetadataValidator class to remove the warnings and the VDB deployed ok. If an issue is going to fail deployment, shouldn't it be on an ERROR?
> Regarding the warnings:
> 1. regarding column size, is it required that all columns in the materialized table to be writable?
> 2. the 2nd warning was due to the 1st warning.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 5 months
[JBoss JIRA] (TEIID-4321) VDB Validation is showing warnings, but failing deployment
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-4321?page=com.atlassian.jira.plugin... ]
Van Halbert commented on TEIID-4321:
------------------------------------
Suggesting something like this:
{code}
List<Column> matViewColumns = matTable.getColumns();
Iterator<Column> it = matViewColumns.iterator();
while (it.hasNext()) {
Column c = it.next();
if (c.isUpdatable()) {
Column tc = table.getColumnByName(c.getName());
if (tc == null) {
metadataValidator.log(report, model, "Updatable column " + c.getName() + " in matview " + matTable.getName() + " is not found in source table " + table.getName());
}
if(!c.getDatatypeUUID().equals(tc.getDatatypeUUID())){
metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31194, tc.getName(), table.getName(), c.getName(), matTable.getName()));
}
}
}
{code}
> VDB Validation is showing warnings, but failing deployment
> ----------------------------------------------------------
>
> Key: TEIID-4321
> URL: https://issues.jboss.org/browse/TEIID-4321
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 9.x
> Reporter: Van Halbert
> Assignee: Steven Hawkins
>
> The deployment of a vdb is failing due to 2 warnings:
> 13:29:01,076 WARN [org.teiid.PLANNER.RESOLVER] (Worker2_async-teiid-threads4) TEIID31193 Table Persons columns size not same as Materialized View {1}s columns size
> 13:29:01,077 WARN [org.teiid.PLANNER.RESOLVER] (Worker2_async-teiid-threads4) TEIID31194 Column PersonObject in Table Person and Column name in Materialized View PersonMatView should have same type
> 13:29:01,080 INFO [org.teiid.RUNTIME] (Worker2_async-teiid-threads4) TEIID40073 The metadata for the VDB PeopleMat.1 is loaded, however it is not valid. Check models for errors. Correct the metadata and re-deploy.
> 13:29:01,080 INFO [org.teiid.RUNTIME.VDBLifeCycleListener] (Worker2_async-teiid-threads4) TEIID40003 VDB PeopleMat.1 is set to FAILED
> I changed the MetadataValidator class to remove the warnings and the VDB deployed ok. If an issue is going to fail deployment, shouldn't it be on an ERROR?
> Regarding the warnings:
> 1. regarding column size, is it required that all columns in the materialized table to be writable?
> 2. the 2nd warning was due to the 1st warning.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 5 months
[JBoss JIRA] (TEIID-4238) Remove need for quotes around cursor name declarations/fetches
by Johnathon Lee (JIRA)
[ https://issues.jboss.org/browse/TEIID-4238?page=com.atlassian.jira.plugin... ]
Johnathon Lee updated TEIID-4238:
---------------------------------
Fix Version/s: 8.7.8.6_2
> Remove need for quotes around cursor name declarations/fetches
> --------------------------------------------------------------
>
> Key: TEIID-4238
> URL: https://issues.jboss.org/browse/TEIID-4238
> Project: Teiid
> Issue Type: Enhancement
> Components: ODBC
> Reporter: Marc Shirley
> Assignee: Steven Hawkins
> Fix For: 9.1, 8.7.8.6_2
>
>
> Attempting to declare a cursor without quotes results in an error similar to[1]. The quotes should be optional except in special cases, as this seems to match later standards (SQL2003). Performing fetch operations against the cursor have the same issue, where if the cursorname is not quoted, parsing errors occur.
> [1] Caused by: org.teiid.api.exception.query.QueryParserException: TEIID31100 Parsing error: Encountered "[*]DECLARE[*] cursorname CURSOR" at line 1, column 1.
> Was expecting: "alter" | "begin" | "call" | "create" | "delete" | "drop" | "exec" | "execute" | "insert" | "merge" ...
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 5 months
[JBoss JIRA] (TEIID-4321) VDB Validation is showing warnings, but failing deployment
by Van Halbert (JIRA)
Van Halbert created TEIID-4321:
----------------------------------
Summary: VDB Validation is showing warnings, but failing deployment
Key: TEIID-4321
URL: https://issues.jboss.org/browse/TEIID-4321
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 9.x
Reporter: Van Halbert
Assignee: Steven Hawkins
The deployment of a vdb is failing due to 2 warnings:
13:29:01,076 WARN [org.teiid.PLANNER.RESOLVER] (Worker2_async-teiid-threads4) TEIID31193 Table Persons columns size not same as Materialized View {1}s columns size
13:29:01,077 WARN [org.teiid.PLANNER.RESOLVER] (Worker2_async-teiid-threads4) TEIID31194 Column PersonObject in Table Person and Column name in Materialized View PersonMatView should have same type
13:29:01,080 INFO [org.teiid.RUNTIME] (Worker2_async-teiid-threads4) TEIID40073 The metadata for the VDB PeopleMat.1 is loaded, however it is not valid. Check models for errors. Correct the metadata and re-deploy.
13:29:01,080 INFO [org.teiid.RUNTIME.VDBLifeCycleListener] (Worker2_async-teiid-threads4) TEIID40003 VDB PeopleMat.1 is set to FAILED
I changed the MetadataValidator class to remove the warnings and the VDB deployed ok. If an issue is going to fail deployment, shouldn't it be on an ERROR?
Regarding the warnings:
1. regarding column size, is it required that all columns in the materialized table to be writable?
2. the 2nd warning was due to the 1st warning.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 5 months