Pig
  1. Pig
  2. PIG-3718

pig alias overrides work only if there is a space character following the alias

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 0.11.1
    • Fix Version/s: None
    • Component/s: parser
    • Labels:
      None

      Description

      when specifying an aliasOverride in registerScript, pig does not replace the override unless there's a space character after it.

      GruntParser:77 =
      if (query.toLowerCase().startsWith(alias.getKey().toLowerCase() + " ")) {

      This makes it impossible to make cool uses of this feature, such as removing custom calls to macros. E.g. if I have a macro called store_only_in_debug_mode, and I want to override it and ignore it in production, it would have been nice if I could just add "store_only_in_debug_mode" to my override list. Currently, this will only work if the script has a space char after the macro call. E.g.

      store_only_in_debug_mode (my_alias); <--- works

      store_only_in_debug_mode(my_alias); <--- doesn't work, sad

        Activity

        Ido Hadanny created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Ido Hadanny
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development