<commit_before>--
CREATE OR REPLACE FUNCTION get_allele_freq(
  _source_id int,
  _rs int[],
  OUT snp_id int,
  OUT snp_current int,
  OUT allele varchar[],
  OUT freq real[],
  OUT freqx real[]
) RETURNS SETOF RECORD AS $$
BEGIN
  RETURN QUERY (
      SELECT
          a.snp_id,
          a.snp_current,
          f.allele,
          f.freq,
          f.freqx
      FROM
          get_current_rs(_rs) a
          LEFT OUTER JOIN (SELECT af.snp_id, af.allele, af.freq, af.freqx FROM allelefreq af WHERE source_id = _source_id) f ON a.snp_current = f.snp_id  -- f.snp_id have been updated to current while bulk importing
  );
END
$$ LANGUAGE plpgsql;
<commit_msg>update type of freqx<commit_after>--
CREATE OR REPLACE FUNCTION get_allele_freq(
  _source_id int,
  _rs int[],
  OUT snp_id int,
  OUT snp_current int,
  OUT allele varchar[],
  OUT freq real[],
  OUT freqx integer[]
) RETURNS SETOF RECORD AS $$
BEGIN
  RETURN QUERY (
      SELECT
          a.snp_id,
          a.snp_current,
          f.allele,
          f.freq,
          f.freqx
      FROM
          get_current_rs(_rs) a
          LEFT OUTER JOIN (SELECT af.snp_id, af.allele, af.freq, af.freqx FROM allelefreq af WHERE source_id = _source_id) f ON a.snp_current = f.snp_id  -- f.snp_id have been updated to current while bulk importing
  );
END
$$ LANGUAGE plpgsql;

{'fraction_non_alphanumeric': 0.08383233532934131, 'fraction_numerical': 0.0, 'mean_word_length': 2.3762626262626263, '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': '973697', 'n_tokens_mistral': 508, 'n_tokens_neox': 491, 'n_words': 145}