Uploaded image for project: 'Sentry'
  1. Sentry
  2. SENTRY-133

Alter table create partition if not exists - results in error

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4.0
    • Component/s: None
    • Labels:
      None

      Description

      Given:

      create table parted (line string) partitioned by (day string);
      

      The following fails:

      alter table parted add if not exists partition (day='Monday');
      

      and this succeeds:

      alter table parted add partition (day='Monday');
      
      2014-03-07 07:41:26,457 ERROR org.apache.hadoop.hive.ql.Driver: FAILED: IllegalArgumentException URI '' in invalid. Must start with file:// or hdfs://
      java.lang.IllegalArgumentException: URI '' in invalid. Must start with file:// or hdfs://
      	at org.apache.sentry.core.AccessURI.<init>(AccessURI.java:33)
      	at org.apache.sentry.binding.hive.HiveAuthzBindingHook.parseURI(HiveAuthzBindingHook.java:272)
      	at org.apache.sentry.binding.hive.HiveAuthzBindingHook.parseURI(HiveAuthzBindingHook.java:247)
      	at org.apache.sentry.binding.hive.HiveAuthzBindingHook.extractPartition(HiveAuthzBindingHook.java:239)
      	at org.apache.sentry.binding.hive.HiveAuthzBindingHook.preAnalyze(HiveAuthzBindingHook.java:171)
      

        Attachments

        1. SENTRY-133.patch
          7 kB
          Brock Noland
        2. SENTRY-133.patch
          7 kB
          Brock Noland

          Activity

            People

            • Assignee:
              brocknoland Brock Noland
              Reporter:
              brocknoland Brock Noland
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: