[teiid-issues] [JBoss JIRA] (TEIID-5074) Support a way provide SEQUENCE in TeiidDialect

Steven Hawkins (JIRA) issues at jboss.org
Mon Sep 25 10:17:00 EDT 2017


    [ https://issues.jboss.org/browse/TEIID-5074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13468007#comment-13468007 ] 

Steven Hawkins commented on TEIID-5074:
---------------------------------------

Did you check if getSelectSequenceNextValString is used?  It needs to be a valid expression, which would be something like:
{code}
       @Override
	public String getSequenceNextValString(String sequenceName) {
		return "select __x.return from " + getSelectSequenceNextValString( sequenceName ) +" as __x";
	}

	@Override
	public String getSelectSequenceNextValString(String sequenceName) {
		return "(call " + getSelectSequenceNextValString( sequenceName ) +"())";
	}
{code}

However if it can be used in a multi-row situation, there will be an issue in that a non-correlated subquery will be evaluated as deteministic.  To make that work correctly would require the usage of a function that is marked as non-deterministic.

> Support a way provide SEQUENCE in TeiidDialect
> ----------------------------------------------
>
>                 Key: TEIID-5074
>                 URL: https://issues.jboss.org/browse/TEIID-5074
>             Project: Teiid
>          Issue Type: Enhancement
>          Components: JDBC Driver
>            Reporter: Ramesh Reddy
>            Assignee: Ramesh Reddy
>             Fix For: 10.0
>
>
> Currently, the sequence based Table identity generation support is not available in current TeiidDialect. The support will not be direct, but with additional constructs in VDB, we can make this available. Teiid needs to provide a way to call in source specific of way to insert a layer in Teiid to accomplish this.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the teiid-issues mailing list