[JBoss JIRA] (TEIID-6001) OData visible metadata can lead to npe building metadata
by Steven Hawkins (Jira)
Steven Hawkins created TEIID-6001:
-------------------------------------
Summary: OData visible metadata can lead to npe building metadata
Key: TEIID-6001
URL: https://issues.redhat.com/browse/TEIID-6001
Project: Teiid
Issue Type: Feature Request
Components: OData
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 15.0, 14.0.1
In looking at TEIID-5873 I could see that we weren't checking for visibility when building navigations. So if an entity is not visible, but is on the other side of a foreign key from an entity that is, we'll throw an npe rather than simply not adding the navigations.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 5 months
[JBoss JIRA] (TEIID-5873) OData mapping issue with mongodb
by Steven Hawkins (Jira)
[ https://issues.redhat.com/browse/TEIID-5873?page=com.atlassian.jira.plugi... ]
Steven Hawkins updated TEIID-5873:
----------------------------------
Fix Version/s: Backlog
> OData mapping issue with mongodb
> ---------------------------------
>
> Key: TEIID-5873
> URL: https://issues.redhat.com/browse/TEIID-5873
> Project: Teiid
> Issue Type: Enhancement
> Components: Misc. Connectors, OData
> Affects Versions: 13.0.1
> Reporter: Chee Kin Lim
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: Backlog
>
> Original Estimate: 1 day, 7 hours
> Time Spent: 3 hours, 30 minutes
> Remaining Estimate: 1 day, 3 hours, 30 minutes
>
> Given the following document in MongoDB matrix_variable collection:
> {
> "_id" : ObjectId("5b2367c9c9e77c0007ca0111"),
> "createdOn" : ISODate("2018-06-15T07:16:25.459Z"),
> "modifiedOn" : ISODate("2018-07-02T02:04:16.661Z"),
> "variableId" : "183cf101d2334ac09bd0db9aee96081f",
> "name" : "lfzq_test",
> "description" : "",
> "lastModifiedUserEmail" : "admin1(a)abc.com",
> "headerRow" : {
> "rowId" : "0b002942a5b4424f98fcc270af0290c3",
> "values" : [
> "name",
> "value"
> ],
> "isEncrypted" : [
> false,
> true
> ]
> },
> "rows" : [
> {
> "rowId" : "940467f9bb724d1688086baeec05049b",
> "values" : [
> "lfzq123q",
> "751c634ca5e24102a00800b386955a5c"
> ]
> }
> ],
> "deleted" : false
> }
> The "headerRow" property is exposed as separate entity type in OData schema, but not "rows" property.
> I found the following entity types with odata/$metadata:
> <EntityType Name="headerRow">...</EntityType>
> <EntityType Name="matrix_variable">...</EntityType>
> Github repo to showcase the issue:
> https://github.com/limcheekin/teiid-spring-boot-mongodb-odata
> Related StackOverflow post:
> https://stackoverflow.com/a/59385181/303211
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 5 months
[JBoss JIRA] (TEIID-5873) OData mapping issue with mongodb
by Steven Hawkins (Jira)
[ https://issues.redhat.com/browse/TEIID-5873?page=com.atlassian.jira.plugi... ]
Steven Hawkins updated TEIID-5873:
----------------------------------
Fix Version/s: (was: 15.0)
Original Estimate: 1 day, 7 hours
Remaining Estimate: 1 day, 7 hours
Story Points: 2
I worked through this on the teiid side in a couple of ways using complex types.
One attempt was to add a complex type as a navigation property - this fails in olingo as there several places that expect to resolve the types to only entities.
Another attempt was to add a complex property directly to the entity. When not specifying the select, it produces behavior similar to https://github.com/OData/WebApi/issues/1887 in that our logic won't know to add the associated join and handling, and thus we end up with a result that has none of the complex type information. Adding more handling along these lines in Teiid is possible, but would be messy - it introduces a separate path for joins and we don't have handling in the select (ODataExpressionToSQLVisitor.visit UriResourceComplexProperty is missing).
Moving out of Teiid 15.
> OData mapping issue with mongodb
> ---------------------------------
>
> Key: TEIID-5873
> URL: https://issues.redhat.com/browse/TEIID-5873
> Project: Teiid
> Issue Type: Enhancement
> Components: Misc. Connectors, OData
> Affects Versions: 13.0.1
> Reporter: Chee Kin Lim
> Assignee: Steven Hawkins
> Priority: Major
> Original Estimate: 1 day, 7 hours
> Remaining Estimate: 1 day, 7 hours
>
> Given the following document in MongoDB matrix_variable collection:
> {
> "_id" : ObjectId("5b2367c9c9e77c0007ca0111"),
> "createdOn" : ISODate("2018-06-15T07:16:25.459Z"),
> "modifiedOn" : ISODate("2018-07-02T02:04:16.661Z"),
> "variableId" : "183cf101d2334ac09bd0db9aee96081f",
> "name" : "lfzq_test",
> "description" : "",
> "lastModifiedUserEmail" : "admin1(a)abc.com",
> "headerRow" : {
> "rowId" : "0b002942a5b4424f98fcc270af0290c3",
> "values" : [
> "name",
> "value"
> ],
> "isEncrypted" : [
> false,
> true
> ]
> },
> "rows" : [
> {
> "rowId" : "940467f9bb724d1688086baeec05049b",
> "values" : [
> "lfzq123q",
> "751c634ca5e24102a00800b386955a5c"
> ]
> }
> ],
> "deleted" : false
> }
> The "headerRow" property is exposed as separate entity type in OData schema, but not "rows" property.
> I found the following entity types with odata/$metadata:
> <EntityType Name="headerRow">...</EntityType>
> <EntityType Name="matrix_variable">...</EntityType>
> Github repo to showcase the issue:
> https://github.com/limcheekin/teiid-spring-boot-mongodb-odata
> Related StackOverflow post:
> https://stackoverflow.com/a/59385181/303211
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 5 months
[JBoss JIRA] (TEIID-5873) OData mapping issue with mongodb
by Steven Hawkins (Jira)
[ https://issues.redhat.com/browse/TEIID-5873?focusedWorklogId=12451813&pag... ]
Steven Hawkins logged work on TEIID-5873:
-----------------------------------------
Author: Steven Hawkins
Created on: 27/Jul/20 4:50 PM
Start Date: 27/Jul/20 4:50 PM
Worklog Time Spent: 3 hours, 30 minutes
Issue Time Tracking
-------------------
Remaining Estimate: 1 day, 3 hours, 30 minutes (was: 1 day, 7 hours)
Time Spent: 3 hours, 30 minutes
Worklog Id: (was: 12451813)
> OData mapping issue with mongodb
> ---------------------------------
>
> Key: TEIID-5873
> URL: https://issues.redhat.com/browse/TEIID-5873
> Project: Teiid
> Issue Type: Enhancement
> Components: Misc. Connectors, OData
> Affects Versions: 13.0.1
> Reporter: Chee Kin Lim
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: Backlog
>
> Original Estimate: 1 day, 7 hours
> Time Spent: 3 hours, 30 minutes
> Remaining Estimate: 1 day, 3 hours, 30 minutes
>
> Given the following document in MongoDB matrix_variable collection:
> {
> "_id" : ObjectId("5b2367c9c9e77c0007ca0111"),
> "createdOn" : ISODate("2018-06-15T07:16:25.459Z"),
> "modifiedOn" : ISODate("2018-07-02T02:04:16.661Z"),
> "variableId" : "183cf101d2334ac09bd0db9aee96081f",
> "name" : "lfzq_test",
> "description" : "",
> "lastModifiedUserEmail" : "admin1(a)abc.com",
> "headerRow" : {
> "rowId" : "0b002942a5b4424f98fcc270af0290c3",
> "values" : [
> "name",
> "value"
> ],
> "isEncrypted" : [
> false,
> true
> ]
> },
> "rows" : [
> {
> "rowId" : "940467f9bb724d1688086baeec05049b",
> "values" : [
> "lfzq123q",
> "751c634ca5e24102a00800b386955a5c"
> ]
> }
> ],
> "deleted" : false
> }
> The "headerRow" property is exposed as separate entity type in OData schema, but not "rows" property.
> I found the following entity types with odata/$metadata:
> <EntityType Name="headerRow">...</EntityType>
> <EntityType Name="matrix_variable">...</EntityType>
> Github repo to showcase the issue:
> https://github.com/limcheekin/teiid-spring-boot-mongodb-odata
> Related StackOverflow post:
> https://stackoverflow.com/a/59385181/303211
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 5 months
[JBoss JIRA] (TEIID-5977) There should be a way to push down a virtual function defined in ddl
by Steven Hawkins (Jira)
[ https://issues.redhat.com/browse/TEIID-5977?focusedWorklogId=12451803&pag... ]
Steven Hawkins logged work on TEIID-5977:
-----------------------------------------
Author: Steven Hawkins
Created on: 24/Jul/20 4:48 PM
Start Date: 24/Jul/20 4:47 PM
Worklog Time Spent: 4 hours
Work Description: Implemented the virtual function source function property.
Issue Time Tracking
-------------------
Remaining Estimate: 0 minutes (was: 4 hours)
Time Spent: 6 hours (was: 2 hours)
Worklog Id: (was: 12451803)
> There should be a way to push down a virtual function defined in ddl
> --------------------------------------------------------------------
>
> Key: TEIID-5977
> URL: https://issues.redhat.com/browse/TEIID-5977
> Project: Teiid
> Issue Type: Enhancement
> Components: Query Engine
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 15.0
>
> Original Estimate: 6 hours
> Time Spent: 6 hours
> Remaining Estimate: 0 minutes
>
> If you create a function that is defined in ddl, it currently requires that a translator be extended to add a pushdown function and handling. It would be better if there were a way to do this entirely in ddl. This could be either/or:
> 1. when the function is defined by an expression rather than a more complex procedure statement, we should check to see if that can be inlined.
> 2. provide a way to match source functions.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 6 months
[JBoss JIRA] (TEIID-5977) There should be a way to push down a virtual function defined in ddl
by Steven Hawkins (Jira)
[ https://issues.redhat.com/browse/TEIID-5977?page=com.atlassian.jira.plugi... ]
Steven Hawkins commented on TEIID-5977:
---------------------------------------
Separated inlining as it's own issue.
> There should be a way to push down a virtual function defined in ddl
> --------------------------------------------------------------------
>
> Key: TEIID-5977
> URL: https://issues.redhat.com/browse/TEIID-5977
> Project: Teiid
> Issue Type: Enhancement
> Components: Query Engine
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 15.0
>
> Original Estimate: 6 hours
> Time Spent: 2 hours
> Remaining Estimate: 4 hours
>
> If you create a function that is defined in ddl, it currently requires that a translator be extended to add a pushdown function and handling. It would be better if there were a way to do this entirely in ddl. This could be either/or:
> 1. when the function is defined by an expression rather than a more complex procedure statement, we should check to see if that can be inlined.
> 2. provide a way to match source functions.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 6 months
[JBoss JIRA] (TEIID-6000) Support virtual function inlining
by Steven Hawkins (Jira)
[ https://issues.redhat.com/browse/TEIID-6000?page=com.atlassian.jira.plugi... ]
Steven Hawkins updated TEIID-6000:
----------------------------------
Parent: (was: TEIID-5977)
Issue Type: Feature Request (was: Sub-task)
> Support virtual function inlining
> ---------------------------------
>
> Key: TEIID-6000
> URL: https://issues.redhat.com/browse/TEIID-6000
> Project: Teiid
> Issue Type: Feature Request
> Components: Query Engine
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 16.0
>
> Original Estimate: 6 hours
> Remaining Estimate: 6 hours
>
> Virtual functions defined purely in ddl can be inlined under a given set of circumstances.
> It should be driven/controlled by a hint/option - never inline, aways inline, or only inline after pushdown (similar to our handling of things like concat2 where it's best to pushdown the original function rather than the compensation).
> the static analysis of whether the function can be inlined should be done only once - that it's just a return statement with an expression. The parameter expressions would need to be checked to see if anything is non-deterministic (or probably if it contains subcommands) and to disallow the inlining if the parameter is used multiple times in the expression (which could also be determined ahead of time). The rewrite could then handle the appropriate expression mapping.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 6 months
[JBoss JIRA] (TEIID-6000) Support virtual function inlining
by Steven Hawkins (Jira)
Steven Hawkins created TEIID-6000:
-------------------------------------
Summary: Support virtual function inlining
Key: TEIID-6000
URL: https://issues.redhat.com/browse/TEIID-6000
Project: Teiid
Issue Type: Sub-task
Components: Query Engine
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 16.0
Virtual functions defined purely in ddl can be inlined under a given set of circumstances.
It should be driven/controlled by a hint/option - never inline, aways inline, or only inline after pushdown (similar to our handling of things like concat2 where it's best to pushdown the original function rather than the compensation).
the static analysis of whether the function can be inlined should be done only once - that it's just a return statement with an expression. The parameter expressions would need to be checked to see if anything is non-deterministic (or probably if it contains subcommands) and to disallow the inlining if the parameter is used multiple times in the expression (which could also be determined ahead of time). The rewrite could then handle the appropriate expression mapping.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 6 months