[JBoss JIRA] (TEIID-5713) Safesforce-41 translator errors
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5713?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-5713.
-----------------------------------
Fix Version/s: 12.2
11.2.3
12.1.1
Resolution: Done
Updated the dependency and the docs.
> Safesforce-41 translator errors
> -------------------------------
>
> Key: TEIID-5713
> URL: https://issues.jboss.org/browse/TEIID-5713
> Project: Teiid
> Issue Type: Bug
> Components: Salesforce Connector
> Reporter: Ramesh Reddy
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 12.2, 11.2.3, 12.1.1
>
>
> Using the Salesforce-41 translator, just loading the metadata it fails with error. I have verified this with WF and SB. I think, it is probably better to switch this version to new version, and remove this version.
> {code}
> Caused by: com.sforce.ws.ConnectionException: ChangeEventHeader Not a valid enumeration for type: class com.sforce.soap.partner.SoapType
> at com.force.api:41//com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:668)
> at com.force.api:41//com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:556)
> at com.force.api:41//com.sforce.soap.partner.Field.setSoapType(Field.java:1702)
> at com.force.api:41//com.sforce.soap.partner.Field.loadFields1(Field.java:2039)
> at com.force.api:41//com.sforce.soap.partner.Field.loadFields(Field.java:1912)
> at com.force.api:41//com.sforce.soap.partner.Field.load(Field.java:1906)
> at com.force.api:41//com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:674)
> at com.force.api:41//com.sforce.ws.bind.TypeMapper.readArray(TypeMapper.java:580)
> at com.force.api:41//com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:558)
> at com.force.api:41//com.sforce.soap.partner.DescribeSObjectResult.setFields(DescribeSObjectResult.java:398)
> at com.force.api:41//com.sforce.soap.partner.DescribeSObjectResult.loadFields1(DescribeSObjectResult.java:1421)
> at com.force.api:41//com.sforce.soap.partner.DescribeSObjectResult.loadFields(DescribeSObjectResult.java:1350)
> at com.force.api:41//com.sforce.soap.partner.DescribeSObjectResult.load(DescribeSObjectResult.java:1344)
> at com.force.api:41//com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:674)
> at com.force.api:41//com.sforce.ws.bind.TypeMapper.readArray(TypeMapper.java:580)
> at com.force.api:41//com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:558)
> at com.force.api:41//com.sforce.soap.partner.DescribeSObjectsResponse_element.setResult(DescribeSObjectsResponse_element.java:48)
> at com.force.api:41//com.sforce.soap.partner.DescribeSObjectsResponse_element.loadFields1(DescribeSObjectsResponse_element.java:107)
> at com.force.api:41//com.sforce.soap.partner.DescribeSObjectsResponse_element.loadFields(DescribeSObjectsResponse_element.java:83)
> at com.force.api:41//com.sforce.soap.partner.DescribeSObjectsResponse_element.load(DescribeSObjectsResponse_element.java:77)
> at com.force.api:41//com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:674)
> at com.force.api:41//com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:556)
> at com.force.api:41//com.sforce.ws.transport.SoapConnection.bind(SoapConnection.java:180)
> at com.force.api:41//com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:154)
> at com.force.api:41//com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:99)
> at com.force.api:41//com.sforce.soap.partner.PartnerConnection.describeSObjects(PartnerConnection.java:1225)
> at org.jboss.teiid.resource-adapter.salesforce-41@12.2.0-SNAPSHOT//org.teiid.resource.adapter.salesforce.SalesforceConnectionImpl.getObjectMetaData(SalesforceConnectionImpl.java:514)
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 8 months
[JBoss JIRA] (TEIID-5713) Safesforce-41 translator errors
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5713?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5713:
---------------------------------------
It looks like the ChangeEventHeader enum was added into the force 42 partner jar. It's very odd that they would retroactively break an api version.
42.0.0 and 45.1.0 look to be functionally equivalent for us - it's the same java api and it works with versions 37+, so now I concur and will just change the 41.0.0 to be the 45.1.0 and note that it's actually compatible through at least 45.
> Safesforce-41 translator errors
> -------------------------------
>
> Key: TEIID-5713
> URL: https://issues.jboss.org/browse/TEIID-5713
> Project: Teiid
> Issue Type: Bug
> Components: Salesforce Connector
> Reporter: Ramesh Reddy
> Assignee: Steven Hawkins
> Priority: Major
>
> Using the Salesforce-41 translator, just loading the metadata it fails with error. I have verified this with WF and SB. I think, it is probably better to switch this version to new version, and remove this version.
> {code}
> Caused by: com.sforce.ws.ConnectionException: ChangeEventHeader Not a valid enumeration for type: class com.sforce.soap.partner.SoapType
> at com.force.api:41//com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:668)
> at com.force.api:41//com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:556)
> at com.force.api:41//com.sforce.soap.partner.Field.setSoapType(Field.java:1702)
> at com.force.api:41//com.sforce.soap.partner.Field.loadFields1(Field.java:2039)
> at com.force.api:41//com.sforce.soap.partner.Field.loadFields(Field.java:1912)
> at com.force.api:41//com.sforce.soap.partner.Field.load(Field.java:1906)
> at com.force.api:41//com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:674)
> at com.force.api:41//com.sforce.ws.bind.TypeMapper.readArray(TypeMapper.java:580)
> at com.force.api:41//com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:558)
> at com.force.api:41//com.sforce.soap.partner.DescribeSObjectResult.setFields(DescribeSObjectResult.java:398)
> at com.force.api:41//com.sforce.soap.partner.DescribeSObjectResult.loadFields1(DescribeSObjectResult.java:1421)
> at com.force.api:41//com.sforce.soap.partner.DescribeSObjectResult.loadFields(DescribeSObjectResult.java:1350)
> at com.force.api:41//com.sforce.soap.partner.DescribeSObjectResult.load(DescribeSObjectResult.java:1344)
> at com.force.api:41//com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:674)
> at com.force.api:41//com.sforce.ws.bind.TypeMapper.readArray(TypeMapper.java:580)
> at com.force.api:41//com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:558)
> at com.force.api:41//com.sforce.soap.partner.DescribeSObjectsResponse_element.setResult(DescribeSObjectsResponse_element.java:48)
> at com.force.api:41//com.sforce.soap.partner.DescribeSObjectsResponse_element.loadFields1(DescribeSObjectsResponse_element.java:107)
> at com.force.api:41//com.sforce.soap.partner.DescribeSObjectsResponse_element.loadFields(DescribeSObjectsResponse_element.java:83)
> at com.force.api:41//com.sforce.soap.partner.DescribeSObjectsResponse_element.load(DescribeSObjectsResponse_element.java:77)
> at com.force.api:41//com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:674)
> at com.force.api:41//com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:556)
> at com.force.api:41//com.sforce.ws.transport.SoapConnection.bind(SoapConnection.java:180)
> at com.force.api:41//com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:154)
> at com.force.api:41//com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:99)
> at com.force.api:41//com.sforce.soap.partner.PartnerConnection.describeSObjects(PartnerConnection.java:1225)
> at org.jboss.teiid.resource-adapter.salesforce-41@12.2.0-SNAPSHOT//org.teiid.resource.adapter.salesforce.SalesforceConnectionImpl.getObjectMetaData(SalesforceConnectionImpl.java:514)
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 8 months
[JBoss JIRA] (TEIID-5714) Can't push cross source function
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5714?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5714:
---------------------------------------
On versions without this fix you'll unfortunately have to pursue on of the workarounds shown.
> Can't push cross source function
> --------------------------------
>
> Key: TEIID-5714
> URL: https://issues.jboss.org/browse/TEIID-5714
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 12.2, 12.1.1
>
>
> With two sources, MODEL1 and MODEL2, with a function on MODEL1:
> CREATE FOREIGN FUNCTION "dbo.examplefunc"(col1 string, col2 date, col3 boolean) returns bigdecimal;
>
> A query of the function against only a table on MODEL2 will fail with "cannot be pushed to source":
> SELECT MODEL1."dbo.examplefunc"(TAB1.STRINGCOL, TAB1.DATE, TRUE) FROM MODEL2.TABLE1 TAB1
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 8 months
[JBoss JIRA] (TEIID-5714) Can't push cross source function
by SHI HONG CHIN (Jira)
[ https://issues.jboss.org/browse/TEIID-5714?page=com.atlassian.jira.plugin... ]
SHI HONG CHIN commented on TEIID-5714:
--------------------------------------
Thanks for filing and fixing this bug for me. In version 12.0 and 12.1, I personally tested that if the function parameter refer to the table column from the *different model*, the error will occur. I had configured Teiid log level to ALL, and it shows error like "function not supported by source".
I will try the snapshot version.
> Can't push cross source function
> --------------------------------
>
> Key: TEIID-5714
> URL: https://issues.jboss.org/browse/TEIID-5714
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 12.2, 12.1.1
>
>
> With two sources, MODEL1 and MODEL2, with a function on MODEL1:
> CREATE FOREIGN FUNCTION "dbo.examplefunc"(col1 string, col2 date, col3 boolean) returns bigdecimal;
>
> A query of the function against only a table on MODEL2 will fail with "cannot be pushed to source":
> SELECT MODEL1."dbo.examplefunc"(TAB1.STRINGCOL, TAB1.DATE, TRUE) FROM MODEL2.TABLE1 TAB1
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 8 months
[JBoss JIRA] (TEIID-5714) Can't push cross source function
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5714?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-5714.
-----------------------------------
Resolution: Done
Addressed by moving the code dealing with the search of sources during evalution to be used during planning as well.
> Can't push cross source function
> --------------------------------
>
> Key: TEIID-5714
> URL: https://issues.jboss.org/browse/TEIID-5714
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 12.2, 12.1.1
>
>
> With two sources, MODEL1 and MODEL2, with a function on MODEL1:
> CREATE FOREIGN FUNCTION "dbo.examplefunc"(col1 string, col2 date, col3 boolean) returns bigdecimal;
>
> A query of the function against only a table on MODEL2 will fail with "cannot be pushed to source":
> SELECT MODEL1."dbo.examplefunc"(TAB1.STRINGCOL, TAB1.DATE, TRUE) FROM MODEL2.TABLE1 TAB1
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 8 months
[JBoss JIRA] (TEIID-5714) Can't push cross source function
by Steven Hawkins (Jira)
Steven Hawkins created TEIID-5714:
-------------------------------------
Summary: Can't push cross source function
Key: TEIID-5714
URL: https://issues.jboss.org/browse/TEIID-5714
Project: Teiid
Issue Type: Bug
Components: Query Engine
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 12.2, 12.1.1
With two sources, MODEL1 and MODEL2, with a function on MODEL1:
CREATE FOREIGN FUNCTION "dbo.examplefunc"(col1 string, col2 date, col3 boolean) returns bigdecimal;
A query of the function against only a table on MODEL2 will fail with "cannot be pushed to source":
SELECT MODEL1."dbo.examplefunc"(TAB1.STRINGCOL, TAB1.DATE, TRUE) FROM MODEL2.TABLE1 TAB1
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 8 months
[JBoss JIRA] (TEIID-5714) Can't push cross source function
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5714?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-5714:
----------------------------------
Workaround Description:
An ugly workaround would be to use a procedure:
begin
create local temporary table t (c bigdecimal);
loop on (SELECT TAB1.STRINGCOL, TAB1.DATE FROM MODEL2.TABLE1 TAB1) as x
begin
insert into t values (MODEL1."dbo.examplefunc"(STRINGCOL, DATE, TRUE) );
end
select * from t;
end
If there is another source table on MODEL1 another slightly less ugly workaround would be to use a subquery associated with MODEL1:
SELECT (SELECT MODEL1."dbo.examplefunc"(TAB1.STRINGCOL, TAB1.DATE, TRUE) FROM MODEL1.TABLEX LIMIT 1) MODEL2.TABLE1 TAB1
> Can't push cross source function
> --------------------------------
>
> Key: TEIID-5714
> URL: https://issues.jboss.org/browse/TEIID-5714
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 12.2, 12.1.1
>
>
> With two sources, MODEL1 and MODEL2, with a function on MODEL1:
> CREATE FOREIGN FUNCTION "dbo.examplefunc"(col1 string, col2 date, col3 boolean) returns bigdecimal;
>
> A query of the function against only a table on MODEL2 will fail with "cannot be pushed to source":
> SELECT MODEL1."dbo.examplefunc"(TAB1.STRINGCOL, TAB1.DATE, TRUE) FROM MODEL2.TABLE1 TAB1
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 8 months