[
https://issues.jboss.org/browse/TEIID-4974?page=com.atlassian.jira.plugin...
]
Jan Stastny reopened TEIID-4974:
--------------------------------
The TRANSLATE function still doesn't work. It is pushed as translate now. But it
causes error
{code:title=error}
Error: TEIID30504 Remote org.teiid.core.TeiidProcessingException: TEIID30504
couchbase_small: Query did not complete successfully: [{"msg":"Invalid
function translate. - at )","code":3000}], error code: fatal
{code}
I couldn't find any such function in Couchbase docs.
{code:sql|title=query}
SELECT INTKEY, TRANSLATE(INTKEY, '1', 'x') FROM BQT1.SmallA
{code}
{code:title=teiid-command.log}
16:30:58,783 INFO [org.teiid.COMMAND_LOG] (New I/O worker #2) QE2ZpDa/Btt5 START USER
COMMAND: startTime=2017-08-24 16:30:58.783 requestID=QE2ZpDa/Btt5.125 txID=null
sessionID=QE2ZpDa/Btt5 applicationName=JDBC principal=user@teiid-security
vdbName=couchbase vdbVersion=1 sql=SELECT INTKEY, TRANSLATE(INTKEY, '1',
'x') FROM BQT1.SmallA
16:30:58,788 DEBUG [org.teiid.COMMAND_LOG] (Worker41_QueryProcessorQueue357) QE2ZpDa/Btt5
START DATA SRC COMMAND: startTime=2017-08-24 16:30:58.788
requestID=QE2ZpDa/Btt5.125 sourceCommandID=0 executionID=86 txID=null
modelName=Couchbase_small translatorName=couchbase sessionID=QE2ZpDa/Btt5
principal=user@teiid-security sql=SELECT Couchbase_small.SmallA.IntKey,
TRANSLATE(convert(Couchbase_small.SmallA.IntKey, string), '1', 'x') FROM
Couchbase_small.SmallA
16:30:58,791 DEBUG [org.teiid.COMMAND_LOG] (Worker41_QueryProcessorQueue357) QE2ZpDa/Btt5
SOURCE SRC COMMAND: endTime=2017-08-24 16:30:58.791
requestID=QE2ZpDa/Btt5.125 sourceCommandID=0 executionID=86 txID=null
modelName=Couchbase_small translatorName=couchbase sessionID=QE2ZpDa/Btt5
principal=user@teiid-security sourceCommand=[SELECT `$cb_c1_IntKey`,
translate(TOSTRING(`$cb_c1_IntKey`), '1', 'x') FROM `dvqe_small` `$cb_t1`
LET `$cb_c1_IntKey` = `$cb_t1`.`IntKey` WHERE `$cb_t1`.`type` = 'SmallA']
16:30:59,193 DEBUG [org.teiid.COMMAND_LOG] (Worker41_QueryProcessorQueue357) QE2ZpDa/Btt5
ERROR SRC COMMAND: endTime=2017-08-24 16:30:59.193
requestID=QE2ZpDa/Btt5.125 sourceCommandID=0 executionID=86 txID=null
modelName=Couchbase_small translatorName=couchbase sessionID=QE2ZpDa/Btt5
principal=user@teiid-security
16:30:59,206 DEBUG [org.teiid.COMMAND_LOG] (Worker40_QueryProcessorQueue358) QE2ZpDa/Btt5
END SRC COMMAND: endTime=2017-08-24 16:30:59.206
requestID=QE2ZpDa/Btt5.125 sourceCommandID=0 executionID=86 txID=null
modelName=Couchbase_small translatorName=couchbase sessionID=QE2ZpDa/Btt5
principal=user@teiid-security finalRowCount=0 cpuTime(ns)=7761659
16:30:59,206 INFO [org.teiid.COMMAND_LOG] (Worker40_QueryProcessorQueue358) QE2ZpDa/Btt5
ERROR USER COMMAND: endTime=2017-08-24 16:30:59.206
requestID=QE2ZpDa/Btt5.125 txID=null sessionID=QE2ZpDa/Btt5
principal=user@teiid-security vdbName=couchbase vdbVersion=1 finalRowCount=null
16:30:59,216 INFO [org.teiid.COMMAND_LOG] (Worker40_QueryProcessorQueue358) QE2ZpDa/Btt5
END USER COMMAND: endTime=2017-08-24 16:30:59.216
requestID=QE2ZpDa/Btt5.125 txID=null sessionID=QE2ZpDa/Btt5
principal=user@teiid-security vdbName=couchbase vdbVersion=1 finalRowCount=0
{code}
Couchbase - TRANSLATE function is transalted as REPLACE
-------------------------------------------------------
Key: TEIID-4974
URL:
https://issues.jboss.org/browse/TEIID-4974
Project: Teiid
Issue Type: Bug
Components: Misc. Connectors
Affects Versions: 8.12.x-6.4
Reporter: Juraj DurĂ¡ni
Assignee: Steven Hawkins
Fix For: 10.0, 8.12.x-6.4, 9.3.1
Teiid's SQL function TRANSLATE is translated to N1QL REPLACE function, but those
functions are not equivalent.
See the difference:
https://developer.couchbase.com/documentation/server/current/n1ql/n1ql-la...
https://teiid.gitbooks.io/documents/content/reference/String_Functions.html
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)