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

get_partitions_ps is HORRIBLY broken

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Metastore, Thrift API
    • Labels:
      None

      Description

      1.) This function assumes that partial spec is in order of the partition columns but it does no checking of this whatsoever. In fact, it throws away everything before the =.
      2.) The regular expression constructed is incorrect because it lacks a trailing '/'. This means that asking for 'ds=2' will return 'ds=2009-01-01/foo=bar'.
      3.) There are multiple implementations of makePartName(). At the very least a code cleanup pass should happen. There is a potentially subtle problem with the one in Warehouse that takes a Map as input since it may not preserve the partition order (which is critical since it is just doing regexp checking).

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jonchang Jonathan Chang
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: