<commit_before>module Alf
  module Update
    class Updater < Lang::Compiler

      def not_supported(*args)
        raise NotSupportedError
      end

      ### VarRef, recursion end :-)

      def on_var_ref(expr, updating, predicate)
        expr.context.update(expr.name, updating, predicate)
      end

      ### non relational

      alias :on_autonum   :not_supported
      alias :on_clip      :not_supported
      alias :on_coerce    :not_supported
      alias :on_compact   :not_supported
      alias :on_defaults  :not_supported
      alias :on_generator :not_supported
      alias :on_sort      :not_supported

      ### relational

      alias :on_extend        :not_supported
      alias :on_group         :not_supported
      alias :on_infer_heading :not_supported
      alias :on_intersect     :not_supported
      alias :on_join          :not_supported
      alias :on_matching      :not_supported
      alias :on_minus         :not_supported
      alias :not_matching     :not_supported
      alias :on_project       :not_supported
      alias :on_quota         :not_supported
      alias :on_rank          :not_supported
      alias :on_rename        :not_supported
      alias :on_restrict      :not_supported
      alias :on_summarize     :not_supported
      alias :on_ungroup       :not_supported
      alias :on_union         :not_supported
      alias :on_unwrap        :not_supported
      alias :on_wrap          :not_supported

    end # class Deleter
  end # module Update
end # module Alf<commit_msg>Add update rule on restrict.<commit_after>module Alf
  module Update
    class Updater < Lang::Compiler

      def not_supported(*args)
        raise NotSupportedError
      end

      ### VarRef, recursion end :-)

      def on_var_ref(expr, updating, predicate)
        expr.context.update(expr.name, updating, predicate)
      end

      ### non relational

      alias :on_autonum   :not_supported
      alias :on_clip      :not_supported
      alias :on_coerce    :not_supported
      alias :on_compact   :not_supported
      alias :on_defaults  :not_supported
      alias :on_generator :not_supported
      alias :on_sort      :not_supported

      ### relational

      alias :on_extend        :not_supported
      alias :on_group         :not_supported
      alias :on_infer_heading :not_supported
      alias :on_intersect     :not_supported
      alias :on_join          :not_supported
      alias :on_matching      :not_supported
      alias :on_minus         :not_supported
      alias :not_matching     :not_supported
      alias :on_project       :not_supported
      alias :on_quota         :not_supported
      alias :on_rank          :not_supported
      alias :on_rename        :not_supported

      def on_restrict(expr, updating, predicate)
        apply(expr.operand, updating, expr.predicate & predicate)
      end

      alias :on_summarize     :not_supported
      alias :on_ungroup       :not_supported
      alias :on_union         :not_supported
      alias :on_unwrap        :not_supported
      alias :on_wrap          :not_supported

    end # class Deleter
  end # module Update
end # module Alf
{'fraction_non_alphanumeric': 0.05768621236133122, 'fraction_numerical': 0.0, 'mean_word_length': 2.194331983805668, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6798136', 'n_tokens_mistral': 911, 'n_tokens_neox': 878, 'n_words': 229}