Nastiness with Hive/ODBC

We ran into an issue that is not documented, although the hive user guide does indicate it should be set. Whenever we issued a statement with the Hive 64-bit ODBC driver through knox, the knox server would truncate anything after 4096 bytes. After much usage of strace, we found the issue noted in the sendto() system call. When we used JDBC, the first sendto() call would be 4096 bytes, but the second part would then be sent by knox. ODBC would tank after the first 4096 bytes were sent, and knox would return an HTTP 500 response code to the client.

After much digging, we found that if we enabled “Use Native Query” in the “Advanced Properties” section of the ODBC driver configuration tool, it worked. My understanding is all this does is instruct the driver to not optimize the SQL for Hive. Perhaps the optimization does something, or otherwise influences behavior. Regardless, we can now issue queries that are longer than 4096 bytes in length with the ODBC driver.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.