Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/6959#discussion_r33109104
  
    --- Diff: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/UnsafeRowConverterSuite.scala
 ---
    @@ -66,14 +72,59 @@ class UnsafeRowConverterSuite extends SparkFunSuite 
with Matchers {
           
ByteArrayMethods.roundNumberOfBytesToNearestWord("Hello".getBytes.length) +
           
ByteArrayMethods.roundNumberOfBytesToNearestWord("World".getBytes.length))
         val buffer: Array[Long] = new Array[Long](sizeRequired / 8)
    -    val numBytesWritten = converter.writeRow(row, buffer, 
PlatformDependent.LONG_ARRAY_OFFSET)
    +    val numBytesWritten = converter.writeRow(row, buffer, 
PlatformDependent.LONG_ARRAY_OFFSET, null)
         numBytesWritten should be (sizeRequired)
     
         val unsafeRow = new UnsafeRow()
    -    unsafeRow.pointTo(buffer, PlatformDependent.LONG_ARRAY_OFFSET, 
fieldTypes.length, null)
    +    val pool = new ObjectPool(10)
    +    unsafeRow.pointTo(buffer, PlatformDependent.LONG_ARRAY_OFFSET, 
fieldTypes.length, pool)
         unsafeRow.getLong(0) should be (0)
         unsafeRow.getString(1) should be ("Hello")
    -    unsafeRow.getBinary(2) should be ("World".getBytes)
    +    unsafeRow.get(2) should be ("World".getBytes)
    --- End diff --
    
    can we stop using should matchers for simple equality comparisons? just use 
===
    
    should matchers are pretty complicated and more verbose to read


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to