[JBoss JIRA] (TEIID-2794) ambiguous function calls are not properly handled
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-2794?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-2794.
-----------------------------------
Resolution: Done
There are three classes of functions in Teiid:
System functions (effectively scoped to SYS) and are known at design time.
Pushdown functions (also effectively scoped to SYS) and are supplied by translators.
UDFs which are schema scoped (except for legacy function models) and are defined via metadata.
When we resolve, system functions take preference - no schema qualification is necessary. But you can introduce for example a concat udf and call it as schema.concat(...).
Pushdown functions then take preference - but are currently a soft spot. If it quite possible that two translators will declare the same function with the same root name, but we will currently not treat that as an ambiguity. The primary reason is that in Designer pushdown functions must be redeclared in metadata to be used (either with the legacy function model or with source functions). So we simply assume that first matching definition is correct. However this is not ideal as we generally should consider all possible targets for the function to aid in pushdown.
Schema scoped functions are last in preference and require qualification if there are conflicting names. Similar to the above there may be a need eventually to add a "conformed" feature for functions (beyond the existing udf / function support mechanism).
> ambiguous function calls are not properly handled
> -------------------------------------------------
>
> Key: TEIID-2794
> URL: https://issues.jboss.org/browse/TEIID-2794
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 7.4
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 8.7
>
>
> For user defined or possibly translator functions that are given the same name the first exact match to the function name and types will be used as the function rather than reporting an ambiguous match.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 11 months
[JBoss JIRA] (TEIID-2794) ambiguous function calls are not properly handled
by Steven Hawkins (JIRA)
Steven Hawkins created TEIID-2794:
-------------------------------------
Summary: ambiguous function calls are not properly handled
Key: TEIID-2794
URL: https://issues.jboss.org/browse/TEIID-2794
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 7.4
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 8.7
For user defined or possibly translator functions that are given the same name the first exact match to the function name and types will be used as the function rather than reporting an ambiguous match.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 11 months
[JBoss JIRA] (TEIID-2792) Must pushdown compensation does not account for translator pushdown functions
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-2792?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-2792.
-----------------------------------
Resolution: Done
When the schema is not set the code will now look for the first source that supports the function to compensate.
> Must pushdown compensation does not account for translator pushdown functions
> -----------------------------------------------------------------------------
>
> Key: TEIID-2792
> URL: https://issues.jboss.org/browse/TEIID-2792
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.5
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 8.7
>
>
> A translator function does not have truly belong to any schema and results in an exception if we attempt to compensate for it:
> TEIID30019 Unexpected exception for request 10BpOpvKhXev.15: java.lang.NullPointerException
> at org.teiid.query.metadata.TempMetadataAdapter.isVirtualModel(TempMetadataAdapter.java:403) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]
> at org.teiid.query.optimizer.relational.rules.CapabilitiesUtil.supports(CapabilitiesUtil.java:451) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]
> at org.teiid.query.processor.relational.SubqueryAwareEvaluator.evaluatePushdown(SubqueryAwareEvaluator.java:359) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 11 months
[JBoss JIRA] (TEIID-2793) Searchablity check is too broad
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-2793?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-2793.
-----------------------------------
Resolution: Done
Changed the check to look at the top level expressions and added a release note.
> Searchablity check is too broad
> -------------------------------
>
> Key: TEIID-2793
> URL: https://issues.jboss.org/browse/TEIID-2793
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 7.4
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 8.7
>
>
> The check against searchabilty metadata gathers all column references in an expression, rather than checking just the expression itself. This was done probably to prevent comparisons such as convert(clob_col, string) = 'foo' - but this is inconsistent as we will happily push the same convert function in the select clause.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 11 months
[JBoss JIRA] (TEIID-2786) ModeShape ExecutionFactory.getMetadata fails with java.sql.SQLFeatureNotSupportedException
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-2786?page=com.atlassian.jira.plugin... ]
Van Halbert commented on TEIID-2786:
------------------------------------
The following will be implemented:
- Extend the JDBCMetadataProcessor class to provide ModeShape specific behavior
- Will add the JCR Procedures to the metadata factory (TEIID-2785)
- Will make the following settings, based on MODE-2125
The following boolean flags should be set to "false" to prevent calling methods in ModeShape's DatabaseMetaData implementation that are not implemented.
• widenUnsingedTypes - ModeShape has no unsigned types anyway (e.g., no short, unsigned short, unsigned int, etc., just LONG and DOUBLE)
• importProcedures - ModeShape has no procedures, so this should always be false.
• useProcedureSpecificName - this is used only when importProcedures is true, which is never the case.
• importKeys - this defaults to true, and if that's the case it attempts to call getPrimaryKeys(...), getIndexInfo(...)}, and {{getImportedKeys(...). ModeShape implements the first two, but not the second. Therefore, *we need to implement getImportedKeys(...) and return an empty result set.
• importIndexes - this defaults to false, but ModeShape does implement getIndexInfo(...), so this could be changed to true.
• importApproximateIndexes - this defaults to true, but it is only used as the final approximate parameter to getIndexInfo(...), and ModeShape ignores this attribute.
• quoteNameInSource - this defaults to true, which is perfect since with ModeShape nearly all names will need to be quoted.
• useQualifiedName - this defaults to true, but I think this should be false since ModeShape never needs the identifier names to be qualified with the catalog or schema
• useCatalogName - this defaults to true, but I think this should be false since ModeShape sets this to the repository name, and such names should never be used in fully-qualified identifier names in queries.
• autoCreateUniqueConstraints - this shouldn't matter, since ModeShape has no foreign keys and thus this flag should never come into play
Notes:
will wrap the new metadata calls to catch java.sql.SQLFeatureNotSupportedException so that Teiid can make the change independent of ModeShape adding support for the methods.
> ModeShape ExecutionFactory.getMetadata fails with java.sql.SQLFeatureNotSupportedException
> ------------------------------------------------------------------------------------------
>
> Key: TEIID-2786
> URL: https://issues.jboss.org/browse/TEIID-2786
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 7.7
> Reporter: Van Halbert
> Assignee: Van Halbert
> Fix For: 8.7
>
>
> When trying to use the Teiid Designer feature of importing using a Teiid Connection fails when the connection is to ModeShape. The following exception:
> 08:33:44,914 ERROR [stderr] (teiid-async-threads - 2) java.sql.SQLFeatureNotSupportedException
> 08:33:44,915 ERROR [stderr] (teiid-async-threads - 2) at org.modeshape.jdbc.JcrMetaData.getTypeInfo(JcrMetaData.java:1656)
> 08:33:44,915 ERROR [stderr] (teiid-async-threads - 2) at org.teiid.translator.jdbc.JDBCMetdataProcessor.getConnectorMetadata(JDBCMetdataProcessor.java:107)
> 08:33:44,915 INFO [org.jboss.as.server] (management-handler-thread - 4) JBAS018559: Deployed "importVDB-vdb.xml" (runtime-name : "importVDB-vdb.xml")
> 08:33:44,916 ERROR [stderr] (teiid-async-threads - 2) at org.teiid.translator.jdbc.modeshape.ModeShapeExecutionFactory.getMetadata(ModeShapeExecutionFactory.java:280)
> 08:33:44,916 ERROR [stderr] (teiid-async-threads - 2) at org.teiid.translator.jdbc.modeshape.ModeShapeExecutionFactory.getMetadata(ModeShapeExecutionFactory.java:62)
> 08:33:44,916 ERROR [stderr] (teiid-async-threads - 2) at org.teiid.query.metadata.NativeMetadataRepository.loadMetadata(NativeMetadataRepository.java:61)
> 08:33:44,917 ERROR [stderr] (teiid-async-threads - 2) at org.teiid.query.metadata.ChainingMetadataRepository.loadMetadata(ChainingMetadataRepository.java:55)
> 08:33:44,917 ERROR [stderr] (teiid-async-threads - 2) at org.teiid.jboss.VDBService$6.run(VDBService.java:397)
> 08:33:44,917 ERROR [stderr] (teiid-async-threads - 2) at org.teiid.jboss.VDBService$7.run(VDBService.java:444)
> 08:33:44,918 ERROR [stderr] (teiid-async-threads - 2) at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33)
> My guess is the local modeshape jdbc driver hasn't been fully vetted in this area, as the remote JDBC version has been the one used when using the Modeshape eclipse plugin for importing the metadata.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 11 months
[JBoss JIRA] (TEIID-2793) Searchablity check is too broad
by Steven Hawkins (JIRA)
Steven Hawkins created TEIID-2793:
-------------------------------------
Summary: Searchablity check is too broad
Key: TEIID-2793
URL: https://issues.jboss.org/browse/TEIID-2793
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 7.4
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 8.7
The check against searchabilty metadata gathers all column references in an expression, rather than checking just the expression itself. This was done probably to prevent comparisons such as convert(clob_col, string) = 'foo' - but this is inconsistent as we will happily push the same convert function in the select clause.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 11 months
[JBoss JIRA] (TEIID-2792) Must pushdown compensation does not account for translator pushdown functions
by Steven Hawkins (JIRA)
Steven Hawkins created TEIID-2792:
-------------------------------------
Summary: Must pushdown compensation does not account for translator pushdown functions
Key: TEIID-2792
URL: https://issues.jboss.org/browse/TEIID-2792
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 8.5
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 8.7
A translator function does not have truly belong to any schema and results in an exception if we attempt to compensate for it:
TEIID30019 Unexpected exception for request 10BpOpvKhXev.15: java.lang.NullPointerException
at org.teiid.query.metadata.TempMetadataAdapter.isVirtualModel(TempMetadataAdapter.java:403) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]
at org.teiid.query.optimizer.relational.rules.CapabilitiesUtil.supports(CapabilitiesUtil.java:451) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]
at org.teiid.query.processor.relational.SubqueryAwareEvaluator.evaluatePushdown(SubqueryAwareEvaluator.java:359) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 11 months