kou commented on code in PR #45403:
URL: https://github.com/apache/arrow/pull/45403#discussion_r1938219175
##########
dev/tasks/homebrew-formulae/apache-arrow.rb:
##########
@@ -110,7 +110,8 @@ def install
return 0;
}
EOS
- system ENV.cxx, "test.cpp", "-std=c++17", "-I#{include}", "-L#{lib}",
"-larrow", "-o", "test"
+ system ENV.cxx, "test.cpp", "-std=c++17", "-I#{include}", "-L#{lib}",
+ "-larrow", "-o", "test"
Review Comment:
Could you exclude this from lint targets?
This is a vendored file. Upstream is
https://github.com/Homebrew/homebrew-core/blob/master/Formula/a/apache-arrow.rb
.
BTW, we should resync this and `apache-arrow-glib.rb`...
##########
c_glib/test/test-array.rb:
##########
@@ -119,7 +119,8 @@ def test_to_s
sub_test_case("#view") do
def test_valid
assert_equal(build_float_array([0.0, 1.5, -2.5, nil]),
- build_int32_array([0, 1069547520, -1071644672,
nil]).view(Arrow::FloatDataType.new))
+ build_int32_array([0, 1069547520, -1071644672, nil])
+ .view(Arrow::FloatDataType.new))
Review Comment:
Let's create a variable:
```ruby
int32_array = build_int32_array([0, 1069547520, -1071644672, nil])
assert_equal(build_float_array([0.0, 1.5, -2.5, nil]),
int32_array.view(Arrow::FloatDataType.new))
```
##########
c_glib/test/test-record-batch-datum.rb:
##########
@@ -49,7 +49,10 @@ def test_false
end
def test_to_string
- assert_equal("RecordBatch(visible: [\n" + " true,\n" + " false\n"
+ " ]\n" + ")", @datum.to_s)
+ assert_equal("RecordBatch(visible: [\n" +
+ " true,\n" + " false\n" +
+ " ]\n" + ")",
+ @datum.to_s)
Review Comment:
Let's use here-document.
##########
ruby/red-arrow/test/each-raw-record/test-map-array.rb:
##########
@@ -271,7 +271,9 @@ def test_time64_nano
unit = Arrow::TimeUnit::NANO
records = [
# 00:10:00.123456789
- [{"key1" => Arrow::Time.new(unit, (60 * 10) * 1_000_000_000 +
123_456_789), "key2" => nil}],
+ [{"key1" => Arrow::Time.new(unit,
+ (60 * 10) * 1_000_000_000 + 123_456_789),
+ "key2" => nil}],
Review Comment:
Let's create a variable:
```ruby
# 00:10:00.123456789
value = Arrow::Time.new(unit, (60 * 10) * 1_000_000_000 + 123_456_789)
records = [
[{"key1" => value, "key2" => nil}],
[nil],
]
```
##########
c_glib/test/test-chunked-array-datum.rb:
##########
@@ -49,7 +49,10 @@ def test_false
end
def test_to_string
- assert_equal("ChunkedArray([\n" + " [\n" + " true,\n" + " false\n"
+ " ]\n" + "])", @datum.to_s)
+ assert_equal("ChunkedArray([\n" +
+ " [\n" + " true,\n" +
+ " false\n" + " ]\n" + "])",
+ @datum.to_s)
Review Comment:
Let's use here-document.
```suggestion
assert_equal(<<-STRING.chomp, @datum.to_s)
ChunkedArray([
[
true,
false
]
]
STRING
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]