[ https://issues.apache.org/jira/browse/TRAFODION-2874?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16354451#comment-16354451 ]
ASF GitHub Bot commented on TRAFODION-2874: ------------------------------------------- Github user DaveBirdsall commented on a diff in the pull request: https://github.com/apache/trafodion/pull/1428#discussion_r166419614 --- Diff: core/sql/cli/Cli.cpp --- @@ -9160,11 +9160,45 @@ Lng32 SQLCLI_LOBcliInterface Int64 outlen = 0;Lng32 len = 0; cliRC = cliInterface->executeImmediate(query,(char *)dataLen, &len, FALSE); - if (inoutDescPartnKey) - *inoutDescPartnKey = descPartnKey; + if (inoutDescPartnKey) + *inoutDescPartnKey = descPartnKey; - if (inoutDescSyskey) - *inoutDescSyskey = inDescSyskey; + if (inoutDescSyskey) + *inoutDescSyskey = inDescSyskey; + + Lng32 saveCliErr = cliRC; + + + if (cliRC < 0) + { + cliInterface->retrieveSQLDiagnostics(myDiags); + + goto error_return; + } + + cliRC = saveCliErr; + } + break; + case LOB_CLI_SELECT_LOBOFFSET: + { + + //Retrive offset of the first chunk + str_sprintf(query, "select c.dataOffset from table(ghost table %s) h, table(ghost table %s) c where h.descPartnKey = c.descPartnKey and h.syskey = c.descSyskey and h.descPartnKey = %ld and h.syskey = %ld and c.chunkNum = 1 for read committed access", + lobDescHandleName, lobDescChunksName, + descPartnKey, inDescSyskey); + + lobDebugInfo(query,0,__LINE__,lobTrace); + // set parserflags to allow ghost table + currContext.setSqlParserFlags(0x1); --- End diff -- Is there code somewhere to revert the parser flags setting? > LOB: Add syntax to return filename of a LOB data file for external LOBs. > ------------------------------------------------------------------------- > > Key: TRAFODION-2874 > URL: https://issues.apache.org/jira/browse/TRAFODION-2874 > Project: Apache Trafodion > Issue Type: Bug > Components: sql-exe > Affects Versions: 2.3 > Reporter: Sandhya Sundaresan > Assignee: Sandhya Sundaresan > Priority: Major > > For external LOBs, Trafodion does not save the LOB data in it's internal > trafodion namespace. It saves only the LOB handle information and the actual > LOB data remains outside in users namespace in HDFS. So inserts are very > eifficient. During extract from an external LOB today, we extract the LOB > data from the external file and return it to the user. Need to extend the > Extract syntax to also be able to return the external LOB data filename alone > . -- This message was sent by Atlassian JIRA (v7.6.3#76005)