Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-43121

Use `BytesWritable.copyBytes` instead of manual copy in `HiveInspectors`

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.5.0
    • 3.5.0
    • SQL
    • None

    Description

      // BytesWritable.copyBytes() only available since Hadoop2
                    // In order to keep backward-compatible, we have to copy the
                    // bytes with old apis
                    val bw = x.getPrimitiveWritableObject(data)
                    val result = new Array[Byte](bw.getLength())
                    System.arraycopy(bw.getBytes(), 0, result, 0, bw.getLength())
                    result

      Attachments

        Activity

          People

            LuciferYang Yang Jie
            LuciferYang Yang Jie
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: