<commit_before>describe "arel-mysql-index-hint" do
  describe "#all" do
    subject do
      User.
        all.
        hint(users: {index_users_on_email: hint_type}).
        to_sql
    end

    let(:sql) do
      "SELECT `users`.* " +
      "FROM `users` " +
      "#{hint_type} INDEX (index_users_on_email)"
    end

    let(:hint_type) { :force }

    it { is_expected.to eq sql }
  end

  describe "call nothing" do
    subject do
      User.
        hint(users: {index_users_on_email: hint_type}).
        to_sql
    end

    let(:sql) do
      "SELECT `users`.* " +
      "FROM `users` " +
      "#{hint_type} INDEX (index_users_on_email)"
    end

    let(:hint_type) { :force }

    it { is_expected.to eq sql }
  end

  describe "#limit" do
    subject do
      User.
        limit(1).
        hint(users: {index_users_on_email: hint_type}).
        to_sql
    end

    let(:sql) do
      "SELECT  `users`.* " +
      "FROM `users` " +
      "#{hint_type} INDEX (index_users_on_email)  " +
      "LIMIT 1"
    end

    let(:hint_type) { :force }

    it { is_expected.to eq sql }
  end

  describe "#first" do
    subject do
      User.
        hint(users: {index_users_on_email: hint_type}).
        first
    end

    let(:sql) do
      "SELECT  `users`.* FROM `users` " +
      "#{hint_type} INDEX (index_users_on_email)   " +
      "ORDER BY `users`.`id` ASC " +
      "LIMIT 1"
    end

    let(:hint_type) { :force }

    it do
      subject

      expect(sql_log).to include sql
    end
  end

  describe "#take" do
    subject do
      User.
        hint(users: {index_users_on_email: hint_type}).
        take
    end

    let(:sql) do
      "SELECT  `users`.* FROM `users` " +
      "#{hint_type} INDEX (index_users_on_email)  " +
      "LIMIT 1"
    end

    let(:hint_type) { :force }

    it do
      subject

      expect(sql_log).to include sql
    end
  end
end<commit_msg>Small fix<commit_after>describe "arel-mysql-index-hint" do
  describe "#all" do
    subject do
      User.
        all.
        hint(users: {index_users_on_email: hint_type}).
        to_sql
    end

    let(:sql) do
      "SELECT `users`.* " +
      "FROM `users` " +
      "#{hint_type} INDEX (index_users_on_email)"
    end

    let(:hint_type) { :force }

    it { is_expected.to eq sql }
  end

  describe "call nothing" do
    subject do
      User.
        hint(users: {index_users_on_email: hint_type}).
        to_sql
    end

    let(:sql) do
      "SELECT `users`.* " +
      "FROM `users` " +
      "#{hint_type} INDEX (index_users_on_email)"
    end

    let(:hint_type) { :force }

    it { is_expected.to eq sql }
  end

  describe "#limit" do
    subject do
      User.
        limit(1).
        hint(users: {index_users_on_email: hint_type}).
        to_sql
    end

    let(:sql) do
      "SELECT  `users`.* " +
      "FROM `users` " +
      "#{hint_type} INDEX (index_users_on_email)  " +
      "LIMIT 1"
    end

    let(:hint_type) { :force }

    it { is_expected.to eq sql }
  end

  describe "#first" do
    subject do
      User.
        hint(users: {index_users_on_email: hint_type}).
        first
    end

    let(:sql) do
      "SELECT  `users`.* FROM `users` " +
      "#{hint_type} INDEX (index_users_on_email)   " +
      "ORDER BY `users`.`id` ASC " +
      "LIMIT 1"
    end

    let(:hint_type) { :force }

    it do
      subject
      expect(sql_log).to include sql
    end
  end

  describe "#take" do
    subject do
      User.
        hint(users: {index_users_on_email: hint_type}).
        take
    end

    let(:sql) do
      "SELECT  `users`.* FROM `users` " +
      "#{hint_type} INDEX (index_users_on_email)  " +
      "LIMIT 1"
    end

    let(:hint_type) { :force }

    it do
      subject
      expect(sql_log).to include sql
    end
  end
end
{'fraction_non_alphanumeric': 0.12236286919831224, 'fraction_numerical': 0.002109704641350211, 'mean_word_length': 1.8910060975609757, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1683635', 'n_tokens_mistral': 1382, 'n_tokens_neox': 1347, 'n_words': 326}