[JBoss JIRA] (TEIID-5561) Prevent alias collisions with built-in odata schema
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5561?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-5561.
-----------------------------------
Resolution: Done
Where things stand:
- schema names will no longer collide with built-in aliases
- schema / vdb names will be decoded. non-letter character letters are allowed by the our odata filter logic - which at least for the schema name is against the spec.
- we'll log a detail message when a table / procedure / column etc. name is not valid wrt odata. The metadata will still be constructed as per usual, but the object in question won't be queryable.
- there was some clean-up of unused methods, and logic around names to start to add more consistency.
> Prevent alias collisions with built-in odata schema
> ---------------------------------------------------
>
> Key: TEIID-5561
> URL: https://issues.jboss.org/browse/TEIID-5561
> Project: Teiid
> Issue Type: Quality Risk
> Components: OData
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 12.1
>
>
> It is problematic to have a Teiid model/schema with the name:
> olingo-extensions
> teiid
> edm
> as that will use an alias that conflicts with built-in handling. We should provide an error/warning as appropriate or come up with the logic to introduce a non-conflicting alias.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 11 months
[JBoss JIRA] (TEIID-5561) Prevent alias collisions with built-in odata schema
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5561?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5561:
---------------------------------------
> So far we have been avoiding it by not using the qualified names. which is working so far.
That only works by separating out the schema. It does not work if the table name actually contains '.'. So I can:
1. Add validations and logs when a table / column name is not valid - we could also add an annotation to the metadata, but I didn't do that just yet.
2. Update all of the schema and sql construction logic to allow for some escaping mechanism, such that any name could be supported - which is a fairly involved change. Alternatively there would need to be some kind of intermediate virtual metadata layer that does the appropriate cleanup.
For now I'll just do 1 and call it a day.
Throwing an error is possible, but it may inadvertently break some cases so I won't do that for now.
Similarly excluding the table / column leads to all kinds of other issues with the logic given our base expectations that anything with a unique / pk is available.
> Prevent alias collisions with built-in odata schema
> ---------------------------------------------------
>
> Key: TEIID-5561
> URL: https://issues.jboss.org/browse/TEIID-5561
> Project: Teiid
> Issue Type: Quality Risk
> Components: OData
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 12.1
>
>
> It is problematic to have a Teiid model/schema with the name:
> olingo-extensions
> teiid
> edm
> as that will use an alias that conflicts with built-in handling. We should provide an error/warning as appropriate or come up with the logic to introduce a non-conflicting alias.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 11 months
[JBoss JIRA] (TEIID-5608) General code formatting
by Steven Hawkins (Jira)
Steven Hawkins created TEIID-5608:
-------------------------------------
Summary: General code formatting
Key: TEIID-5608
URL: https://issues.jboss.org/browse/TEIID-5608
Project: Teiid
Issue Type: Task
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 13.0
It would be good to add hard checkstyle formatting checks (in particular tabs) in the build, but first we need to take a pass through to clean up things.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 11 months
[JBoss JIRA] (TEIID-5561) Prevent alias collisions with built-in odata schema
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5561?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5561:
---------------------------------------
> The most problematic char is period imo
Yes that one occurs commonly in both table and even column names. If I address that, I should be able to address everything though. I'll see what's possible.
> Prevent alias collisions with built-in odata schema
> ---------------------------------------------------
>
> Key: TEIID-5561
> URL: https://issues.jboss.org/browse/TEIID-5561
> Project: Teiid
> Issue Type: Quality Risk
> Components: OData
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 12.1
>
>
> It is problematic to have a Teiid model/schema with the name:
> olingo-extensions
> teiid
> edm
> as that will use an alias that conflicts with built-in handling. We should provide an error/warning as appropriate or come up with the logic to introduce a non-conflicting alias.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 11 months
[JBoss JIRA] (TEIID-5561) Prevent alias collisions with built-in odata schema
by Ramesh Reddy (Jira)
[ https://issues.jboss.org/browse/TEIID-5561?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-5561:
-------------------------------------
I am fine side of erroring as we have not seen this case yet and it has easy ways ways to workaround in Teiid.
The most problematic char is period imo
> Prevent alias collisions with built-in odata schema
> ---------------------------------------------------
>
> Key: TEIID-5561
> URL: https://issues.jboss.org/browse/TEIID-5561
> Project: Teiid
> Issue Type: Quality Risk
> Components: OData
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 12.1
>
>
> It is problematic to have a Teiid model/schema with the name:
> olingo-extensions
> teiid
> edm
> as that will use an alias that conflicts with built-in handling. We should provide an error/warning as appropriate or come up with the logic to introduce a non-conflicting alias.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 11 months
[JBoss JIRA] (TEIID-5561) Prevent alias collisions with built-in odata schema
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5561?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5561:
---------------------------------------
Thanks. Forgot to check the ABNF. That clarifies what is expected. Using the referenced TSimpleIdentifier pattern confirms that most non-letter characters are not accepted. That is a problem for us in that it's much more restrictive than SQL identifiers. The olingo metadata layer does not apply any restrictions, so we can create invalid metadata that is not queryable. It is possible to choose a naming replacement strategy similar to what is done with sql/xml names, but that will be a big change at first glance given our assumptions about the 1-1 mapping between odata and teiid metadata names.
> Prevent alias collisions with built-in odata schema
> ---------------------------------------------------
>
> Key: TEIID-5561
> URL: https://issues.jboss.org/browse/TEIID-5561
> Project: Teiid
> Issue Type: Quality Risk
> Components: OData
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 12.1
>
>
> It is problematic to have a Teiid model/schema with the name:
> olingo-extensions
> teiid
> edm
> as that will use an alias that conflicts with built-in handling. We should provide an error/warning as appropriate or come up with the logic to introduce a non-conflicting alias.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 11 months
[JBoss JIRA] (TEIID-5561) Prevent alias collisions with built-in odata schema
by Ramesh Reddy (Jira)
[ https://issues.jboss.org/browse/TEIID-5561?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-5561:
-------------------------------------
They identify all names conform to what is referred to as "odataIdentifier". The below is ABNF form
{code}
odataIdentifier = identifierLeadingCharacter *127identifierCharacter
identifierLeadingCharacter = ALPHA / "_" ; plus Unicode characters from the categories L or Nl
identifierCharacter = ALPHA / "_" / DIGIT ; plus Unicode characters from the categories L, Nl, Nd, Mn, Mc, Pc, or Cf
{code}
> Prevent alias collisions with built-in odata schema
> ---------------------------------------------------
>
> Key: TEIID-5561
> URL: https://issues.jboss.org/browse/TEIID-5561
> Project: Teiid
> Issue Type: Quality Risk
> Components: OData
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 12.1
>
>
> It is problematic to have a Teiid model/schema with the name:
> olingo-extensions
> teiid
> edm
> as that will use an alias that conflicts with built-in handling. We should provide an error/warning as appropriate or come up with the logic to introduce a non-conflicting alias.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 11 months
[JBoss JIRA] (TEIID-5561) Prevent alias collisions with built-in odata schema
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5561?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5561:
---------------------------------------
For the vdb/model name there is a straight-forward fix. olingo already handles decoding, but it does not like having the meta characters / $ & etc. as part of the entity names.
> Prevent alias collisions with built-in odata schema
> ---------------------------------------------------
>
> Key: TEIID-5561
> URL: https://issues.jboss.org/browse/TEIID-5561
> Project: Teiid
> Issue Type: Quality Risk
> Components: OData
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 12.1
>
>
> It is problematic to have a Teiid model/schema with the name:
> olingo-extensions
> teiid
> edm
> as that will use an alias that conflicts with built-in handling. We should provide an error/warning as appropriate or come up with the logic to introduce a non-conflicting alias.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 11 months
[JBoss JIRA] (TEIID-5561) Prevent alias collisions with built-in odata schema
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5561?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5561:
---------------------------------------
URL reserved characters are a problem also. The odata filter uses httpRequest.getContextPath() to determine the vdb, version, and schema - but that url is not decoded. I can't really find a reference in the odata spec as to the expectation or limitation on schema names.
> Prevent alias collisions with built-in odata schema
> ---------------------------------------------------
>
> Key: TEIID-5561
> URL: https://issues.jboss.org/browse/TEIID-5561
> Project: Teiid
> Issue Type: Quality Risk
> Components: OData
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 12.1
>
>
> It is problematic to have a Teiid model/schema with the name:
> olingo-extensions
> teiid
> edm
> as that will use an alias that conflicts with built-in handling. We should provide an error/warning as appropriate or come up with the logic to introduce a non-conflicting alias.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 11 months