<commit_before>class Prestodb < Formula
  desc "Distributed SQL query engine for big data"
  homepage "https://prestodb.io"
  url "https://search.maven.org/remotecontent?filepath=com/facebook/presto/presto-server/0.247/presto-server-0.247.tar.gz"
  sha256 "a0bd4522ddf54e945ca26644c6601feabcdf297e003f17c8a7849dc952e42992"
  license "Apache-2.0"

  # The source of the Presto download page at https://prestodb.io/download.html
  # contains old version information. The current version information is loaded
  # from the JavaScript file below, so we check that instead. We don't check
  # Maven because sometimes the directory listing page contains a newer version
  # that hasn't been released yet and we probably don't want to upgrade until
  # it's official on the first-party website, etc.
  livecheck do
    url "https://prestodb.io/static/js/version.js"
    regex(/latest_presto_version.*?(\d+(?:\.\d+)+)/i)
  end

  bottle :unneeded

  depends_on "openjdk"

  conflicts_with "prestosql", because: "both install `presto` and `presto-server` binaries"

  resource "presto-cli" do
    url "https://search.maven.org/remotecontent?filepath=com/facebook/presto/presto-cli/0.247/presto-cli-0.247-executable.jar"
    sha256 "1add86e1cb83b6cb6841df45744264d18193acd8b366aabe88edf26203e0d6ec"
  end

  def install
    libexec.install Dir["*"]

    (libexec/"etc/node.properties").write <<~EOS
      node.environment=production
      node.id=ffffffff-ffff-ffff-ffff-ffffffffffff
      node.data-dir=#{var}/presto/data
    EOS

    (libexec/"etc/jvm.config").write <<~EOS
      -server
      -Xmx16G
      -XX:+UseG1GC
      -XX:G1HeapRegionSize=32M
      -XX:+UseGCOverheadLimit<commit_msg>prestodb 0.248<commit_after>class Prestodb < Formula
  desc "Distributed SQL query engine for big data"
  homepage "https://prestodb.io"
  url "https://search.maven.org/remotecontent?filepath=com/facebook/presto/presto-server/0.248/presto-server-0.248.tar.gz"
  sha256 "7bd111cfc32c84a453af0255a581bf18c3d88f38d84951ee00b95a8a81f75116"
  license "Apache-2.0"

  # The source of the Presto download page at https://prestodb.io/download.html
  # contains old version information. The current version information is loaded
  # from the JavaScript file below, so we check that instead. We don't check
  # Maven because sometimes the directory listing page contains a newer version
  # that hasn't been released yet and we probably don't want to upgrade until
  # it's official on the first-party website, etc.
  livecheck do
    url "https://prestodb.io/static/js/version.js"
    regex(/latest_presto_version.*?(\d+(?:\.\d+)+)/i)
  end

  bottle :unneeded

  depends_on "openjdk"

  conflicts_with "prestosql", because: "both install `presto` and `presto-server` binaries"

  resource "presto-cli" do
    url "https://search.maven.org/remotecontent?filepath=com/facebook/presto/presto-cli/0.248/presto-cli-0.248-executable.jar"
    sha256 "c4d3f4bed11f62a58b0c7649c6aaa35b362f962f4c5e8a7457666f184a922b0a"
  end

  def install
    libexec.install Dir["*"]

    (libexec/"etc/node.properties").write <<~EOS
      node.environment=production
      node.id=ffffffff-ffff-ffff-ffff-ffffffffffff
      node.data-dir=#{var}/presto/data
    EOS

    (libexec/"etc/jvm.config").write <<~EOS
      -server
      -Xmx16G
      -XX:+UseG1GC
      -XX:G1HeapRegionSize=32M
      -XX:+UseGCOverheadLimit
{'fraction_non_alphanumeric': 0.11183625037080985, 'fraction_numerical': 0.06615247700978938, 'mean_word_length': 3.851798561151079, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 3, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 4, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6495659', 'n_tokens_mistral': 1329, 'n_tokens_neox': 1205, 'n_words': 252}