Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-3382

Strings truncated to length 334 when hive data is accessed through hive ODBC driver.

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 0.8.1
    • Fix Version/s: None
    • Component/s: ODBC
    • Labels:
      None
    • Environment:

      Ubuntu Linux 10.04

      Description

      I'm trying to fetch data from hive server using hive ODBC driver.

      I observed that strings being fetched at application side are truncated to length 334, I further looked into the hiveclient code and found there are two variables which are hardcoded to “334”

      ./src/odbc/src/cpp/thriftserverconstants.h:static const int MAX_DISPLAY_SIZE = 334;
      ./src/odbc/src/cpp/thriftserverconstants.h:static const int MAX_BYTE_LENGTH = 334;

      I tried finding usage of these variables and looks like MAX_BYTE_LENGTH is causing issue of string truncation.

      abhi@vmabhihive:~/hhh/ts/hive-0.8.1$ find . -type f -name "*.h" | xargs grep "MAX_BYTE_LENGTH"
      ./src/odbc/src/cpp/HiveRowSet.h: /// Forces all data retrieved to be no more than MAX_BYTE_LENGTH
      ./src/odbc/src/cpp/HiveRowSet.h: char m_field_buffer[MAX_BYTE_LENGTH + 1];

      Expected behavior : Strings should be read completely [or upto length of application specified buffer length] instead of getting truncated to length 334.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              abhiapsunde Abhijeet Apsunde
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: