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

Alter table create partition if not exists - results in error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • None
    • 1.4.0
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: