Uploaded image for project: 'CDAP'
  1. CDAP
  2. CDAP-4790

Discrepancy between implementations of Table API

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.3.0
    • Fix Version/s: 3.3.1
    • Component/s: API, Datasets
    • Labels:
      None
    • Release Notes:
      Fixes Table APIs to not return all columns, when an empty set of columns is requested.
    • Rank:
      1|hzz5yv:

      Description

      The co.cask.cdap.api.dataset.table.Table class in CDAP has discrepancy between the HBase version and the LevelDB/In-Memory version.

      The method:

      Row get(byte[] row, byte[][] columns);

      does not document what the behavior is in two scenarios:
      1) columns is null
      2) columns is empty byte array

      For the first case, the actual implementation is consistent across; it will retrieve all columns.
      In the second case, however, In-memory and LevelDB implementations return zero columns, but HBase implementation returns all columns.

      The behavior when columns is empty byte array needs to be decided and made consistent across the implementations.
      This will have to result in backwards incompatibility in CDAP as well as in user applications that use Table.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ali.anwar Ali Anwar
                Reporter:
                ali.anwar Ali Anwar
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: