Skip to content

Commit

Permalink
parquet-cli: update test, use tarball
Browse files Browse the repository at this point in the history
  • Loading branch information
branchvincent committed Jul 28, 2024
1 parent 22a1f2f commit f75388a
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions Formula/p/parquet-cli.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
class ParquetCli < Formula
desc "Apache Parquet command-line tools and utilities"
homepage "https://parquet.apache.org/"
url "https://github.com/apache/parquet-mr.git",
tag: "apache-parquet-1.14.1",
revision: "97ede968377400d1d79e3196636ba3de392196ba"
url "https://github.com/apache/parquet-java/archive/refs/tags/apache-parquet-1.14.1.tar.gz"
sha256 "e187ec57c60e1057f4c91a38fd9fb10a636b56b0dac5b2d25649e85901a61434"
license "Apache-2.0"
head "https://github.com/apache/parquet-mr.git", branch: "master"

Expand All @@ -13,11 +12,6 @@ class ParquetCli < Formula
end

depends_on "maven" => :build

# parquet-cli has problems running on Linux, for more information:
# https://github.com/Homebrew/homebrew-core/pull/94318#issuecomment-1049229342
depends_on :macos

depends_on "openjdk"

def install
Expand All @@ -34,6 +28,7 @@ def install
end

(pkgshare/"test").install "parquet-avro/src/test/avro/stringBehavior.avsc"
(pkgshare/"test").install "parquet-avro/src/test/resources/strings-2.parquet"
end

test do
Expand All @@ -48,5 +43,17 @@ def install
"type" : "string"
}, {
EOS

output = shell_output("#{bin}/parquet schema #{pkgshare}/test/strings-2.parquet")
assert_match <<~EOS, output
{
"type" : "record",
"name" : "mystring",
"fields" : [ {
"name" : "text",
"type" : "string"
} ]
}
EOS
end
end

0 comments on commit f75388a

Please sign in to comment.