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

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

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

    https://github.com/apache/incubator-trafodion/pull/915#discussion_r96522147
  
    --- Diff: core/sql/exp/ExpLOBaccess.cpp ---
    @@ -198,7 +198,7 @@ Ex_Lob_Error ExLob::fetchCursor(char *handleIn, Int32 
handleLenIn, Int64 &outOff
       lobCursors_it it = lobCursors_.find(string(handleIn, handleLenIn));
       char logBuf[4096];
       lobDebugInfo("In ExLob::fetchCursor",0,__LINE__,lobTrace_);
    -  char *blackBox = new(getLobGlobalHeap()) char[MAX_LOB_FILE_NAME_LEN+6];
    +  char *blackBox = new(getLobGlobalHeap()) char[MAX_LOB_FILE_NAME_LEN+6]; 
// TODO: do we ever go this way for Hive?
       Int32 blackBoxLen = 0;
    --- End diff --
    
    This code path is taken for external LOB files. The file name could be 
provided by the user in the form of file:///<path name>/.../<filename> So 
perhaps best to change this too. 


> Accessing a Hive table with long names results in error 8436
> ------------------------------------------------------------
>
>                 Key: TRAFODION-2440
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2440
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: -exe, sql-exe
>    Affects Versions: 2.1-incubating
>            Reporter: David Wayne Birdsall
>            Assignee: David Wayne Birdsall
>
> If we use a long Hive database name and a long Hive table name, attempts to 
> select from that table from Trafodion fail with SQL error 8436.
> Example: Use the following hive script to create a table via the Hive shell:
> drop database if exists
> Trafodion2434abcdabcdefghijabcdefghij01234567890123456789012345678901234567890123456789012345678901234567890123456789
> cascade;
> create database
> Trafodion2434abcdabcdefghijabcdefghij01234567890123456789012345678901234567890123456789012345678901234567890123456789
> ;
> use
> Trafodion2434abcdabcdefghijabcdefghij01234567890123456789012345678901234567890123456789012345678901234567890123456789
> ;
> drop table if exists 
> ProblemTableSTR1abcdefabcdefghijabcdefghij01234567890123456789012345678901234567890123456789012345678901234567890123456789;
> create table 
> ProblemTableSTR1abcdefabcdefghijabcdefghij01234567890123456789012345678901234567890123456789012345678901234567890123456789
> (
> Column01 int,
> Column02 string
> ) clustered by (Column01) sorted by (Column01) into 4 buckets row format 
> delimited fields terminated by '|';
> insert into 
> ProblemTableSTR1abcdefabcdefghijabcdefghij01234567890123456789012345678901234567890123456789012345678901234567890123456789
> values
> (1,'one');
>       
> insert into 
> ProblemTableSTR1abcdefabcdefghijabcdefghij01234567890123456789012345678901234567890123456789012345678901234567890123456789
> values
> (2,'two');
> insert into 
> ProblemTableSTR1abcdefabcdefghijabcdefghij01234567890123456789012345678901234567890123456789012345678901234567890123456789
> values
> (3,'three');
> insert into 
> ProblemTableSTR1abcdefabcdefghijabcdefghij01234567890123456789012345678901234567890123456789012345678901234567890123456789
> values
> (4,'four');
> select * from
> ProblemTableSTR1abcdefabcdefghijabcdefghij01234567890123456789012345678901234567890123456789012345678901234567890123456789
> ;
> exit;
> Next, do the following in sqlci:
> control query default HIVE_MAX_STRING_LENGTH '10';
> set schema 
> hive.Trafodion2434abcdabcdefghijabcdefghij01234567890123456789012345678901234567890123456789012345678901234567890123456789
> ;
> showddl 
> ProblemTableSTR1abcdefabcdefghijabcdefghij01234567890123456789012345678901234567890123456789012345678901234567890123456789
> ;
> select * from 
> ProblemTableSTR1abcdefabcdefghijabcdefghij01234567890123456789012345678901234567890123456789012345678901234567890123456789
> ;
> This will fail as follows:
> >>control query default HIVE_MAX_STRING_LENGTH '10';
> --- SQL operation complete.
> >>
> >>set schema 
> >>hive.Trafodion2434abcdabcdefghijabcdefghij01234567890123456789012345678901234567890123456789012345678901234567890123456789
> +>;
> --- SQL operation complete.
> >>
> >>showddl 
> >>ProblemTableSTR1abcdefabcdefghijabcdefghij01234567890123456789012345678901234567890123456789012345678901234567890123456789
> +>;
> /* Hive DDL */
> CREATE TABLE 
> PROBLEMTABLESTR1ABCDEFABCDEFGHIJABCDEFGHIJ01234567890123456789012345678901234567890123456789012345678901234567890123456789
>   (
>     COLUMN01                         int
>   , COLUMN02                         string
>   )
>   stored as textfile
> ;
> --- SQL operation complete.
> >>
> >>select * from 
> >>ProblemTableSTR1abcdefabcdefghijabcdefghij01234567890123456789012345678901234567890123456789012345678901234567890123456789
> +>;
> *** ERROR[8436] Mismatch detected between compiletime and runtime hive table 
> definitions. DataModMismatchDetails:
> --- 0 row(s) selected.
> >>



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

Reply via email to