You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Alice Chen (JIRA)" <ji...@apache.org> on 2015/07/22 20:18:01 UTC

[jira] [Created] (TRAFODION-745) LP Bug: 1390261 - odbc does not return any value from hbase table

Alice Chen created TRAFODION-745:
------------------------------------

             Summary: LP Bug: 1390261 - odbc does not return any value from hbase table
                 Key: TRAFODION-745
                 URL: https://issues.apache.org/jira/browse/TRAFODION-745
             Project: Apache Trafodion
          Issue Type: Bug
          Components: client-odbc-windows
            Reporter: Paul Chin
            Assignee: Daniel Lu
            Priority: Critical
             Fix For: 1.0 (pre-incubation)


The below cod, querying an Hbase table, always returns an empty string so the length of the variable Page = 0. When executing the same SQL from SQLCI, it works OK the first time; if trying the second time, SQLCI core-dumps. I then start SQLCI again and it works, but only one time before a new core dump.

This is the snipped from my aps: So the ODBC driver in line 09 indicates that there are data returned and in line 10 it’s indicated that it’s not a NULL value, but after executing line 11, the variable Page is empty. I use the same method when talking to Trafodion tables and it works just fine.

Mind you, this is the html data of up-to 32K I’m retrieving so must have something to do with the length because if I retrieve the row_id, which is only 14 CHARS, it works ok.

      01      With CMDtraf
      02          .CommandTimeout = 60
      03          .Connection.Open()
      04          .Parameters.Add("@caseid", OdbcType.Char, 14)
      05          .CommandText = "SELECT col_value from hbase.""_CELL_"".""bjcases"" WHERE row_id = ?"
      06          .Prepare()
      07          .Parameters("@caseid").Value = CaseID
      08          Dim odbcreader As OdbcDataReader = .ExecuteReader()
      09          If odbcreader.HasRows Then
      10              If Not IsDBNull(odbcreader(0)) Then
      11                  Page = odbcreader(0)
      12                  Dim TheBrowser = CreateObject("InternetExplorer.Application")
      13                  TheBrowser.Visible = True
      14                  TheBrowser.Navigate(Page)
      15              Else
      16                  labAlertMsg.Text = "Case page not found in Trafodion"
      17              End If
      18          End If
      19          odbcreader.Close()
      20          .Connection.Close()
      21      End With

So these are the 3 statements I have tried in line 05 (with double “” removed. Only in the code for syntax reason.
SELECT col_value from hbase."_CELL_"."bjcases" WHERE row_id = ?
SELECT CAST(col_value AS VARCHAR(1000)) from hbase."_CELL_"."bjcases" WHERE row_id = ?
SELECT LEFT(col_value,1000) from hbase."_CELL_"."bjcases" WHERE row_id = ?



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