[ 
https://issues.apache.org/jira/browse/TRAFODION-1473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15085813#comment-15085813
 ] 

ASF GitHub Bot commented on TRAFODION-1473:
-------------------------------------------

Github user sandhyasun commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/248#discussion_r48979445
  
    --- Diff: core/sql/clitest/blobtest.cpp ---
    @@ -0,0 +1,255 @@
    +/**********************************************************************
    +// @@@ START COPYRIGHT @@@
    +//
    +// Licensed to the Apache Software Foundation (ASF) under one
    +// or more contributor license agreements.  See the NOTICE file
    +// distributed with this work for additional information
    +// regarding copyright ownership.  The ASF licenses this file
    +// to you under the Apache License, Version 2.0 (the
    +// "License"); you may not use this file except in compliance
    +// with the License.  You may obtain a copy of the License at
    +//
    +//   http://www.apache.org/licenses/LICENSE-2.0
    +//
    +// Unless required by applicable law or agreed to in writing,
    +// software distributed under the License is distributed on an
    +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +// KIND, either express or implied.  See the License for the
    +// specific language governing permissions and limitations
    +// under the License.
    +//
    +// @@@ END COPYRIGHT @@@
    +**********************************************************************/
    +/* -*-C++-*-
    
+****************************************************************************
    +*
    +* File:         Helper functions for use by bin/clitest.cpp
    +* Description:  Test driver useing exe util cli interface
    +*
    +*
    +*
    +*
    
+****************************************************************************
    +*/
    +#include "blobtest.h"
    +
    +Int32 extractLengthOfLobColumn(CliGlobals *cliglob, char *lobHandle, 
    +                          Int64 &lengthOfLob, 
    +                          char *lobColumnName, char *tableName)
    +{
    +  Int32 retcode = 0;
    +  char * query = new char[4096];
    +  ExeCliInterface cliInterface((cliglob->currContext())->exHeap(), 
(Int32)SQLCHARSETCODE_UTF8, cliglob->currContext(),NULL);
    +  //Use lob handle to retrieve the lob length.
    +  char lobLengthResult[200];
    +  str_cpy_all(lobLengthResult," ",200);
    +  Int32 lobLengthResultLen = 0;
    +  str_sprintf(query,"extract loblength (lob '%s') LOCATION %Ld 
",lobHandle, &lengthOfLob);
    +  retcode = 
cliInterface.executeImmediate(query,lobLengthResult,&lobLengthResultLen,FALSE);
    +
    +  delete query;
    +  return retcode;
    + 
    +}
    +
    +Int32 extractLobHandle(CliGlobals *cliglob, char *& lobHandle, 
    +                  char *lobColumnName, char *tableName)
    +{
    +  Int32 retcode = 0;
    +  ExeCliInterface cliInterface((cliglob->currContext())->exHeap(), 
(Int32)SQLCHARSETCODE_UTF8, cliglob->currContext(),NULL);
    +  char * query = new char[4096];
    +  Int32 lobHandleLen = 0;
    +  str_sprintf(query,"select %s from %s",lobColumnName,tableName);
    +  
    +  retcode = 
cliInterface.executeImmediate(query,lobHandle,&lobHandleLen,FALSE);
    +
    +  if (retcode)
    +    return retcode;
    --- End diff --
    
    For the syntax in the previous comment(could not add Line Note there) , it 
was because the comments use markup and all test within <> got chopped off. The 
syntax should look better now, I edited it. 
    
    Fixed memory leak .


> Adding external buffer and file input and extract support  for  LOB datatypes
> -----------------------------------------------------------------------------
>
>                 Key: TRAFODION-1473
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-1473
>             Project: Apache Trafodion
>          Issue Type: Task
>          Components: sql-cmp, sql-exe
>         Environment: Trafodion
>            Reporter: Sandhya Sundaresan
>            Assignee: Sandhya Sundaresan
>              Labels: features
>             Fix For: 1.2-incubating
>
>
> LOB datatype is disabled in Trafodion  until the following support is fully 
> in.
> Here are the list of tasks and items to support :
> 1. Support input of linux files (on platform)  into LOB columns.
> 2. Support extract of LOB data into linux files on platform.
> 3. Support input of hdfs files  into LOB columns.
> 4. Support extract of LOB data into hdfs files.
> 5. Support chunking to input a very large external file into LOB columns.
> 6. Use CQD concept to limit LOB max size and limit chunk size for extract 
> /input.
> TBD 
> 7. Support for  input/extract of external files off platform into LOB columns.
> 8. Support in connectivity and driver for real LOB data type.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to