Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion dev/archery/archery/integration/datagen.py
Original file line number Diff line number Diff line change
Expand Up @@ -1477,7 +1477,6 @@ def _temp_path():

generate_primitive_large_offsets_case([17, 20])
.skip_category('Go')
.skip_category('Java') # TODO(ARROW-6110)
.skip_category('JS'),

generate_null_case([10, 0])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,7 @@ public void setBytes(long index, ByteBuffer src, int srcIndex, int length) {
* dst ArrowBuf has access to)
* @param length length of data to copy
*/
public void getBytes(long index, ArrowBuf dst, int dstIndex, int length) {
public void getBytes(long index, ArrowBuf dst, long dstIndex, int length) {
// bound check for this ArrowBuf where the data will be copied from
checkIndex(index, length);
// bound check for this ArrowBuf where the data will be copied into
Expand Down
10 changes: 10 additions & 0 deletions java/vector/src/main/codegen/data/ArrowTypes.tdd
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,21 @@
fields: [],
complex: false
},
{
name: "LargeUtf8",
fields: [],
complex: false
},
{
name: "Binary",
fields: [],
complex: false
},
{
name: "LargeBinary",
fields: [],
complex: false
},
{
name: "FixedSizeBinary",
fields: [{name: "byteWidth", type: int}],
Expand Down
11 changes: 11 additions & 0 deletions java/vector/src/main/codegen/data/ValueVectorTypes.tdd
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,17 @@
{ class: "VarChar" , friendlyType: "Text" }
]
},
{
major: "VarLen",
width: 8,
javaType: "long",
boxedType: "ArrowBuf",
fields: [{name: "start", type: "long"}, {name: "end", type: "long"}, {name: "buffer", type: "ArrowBuf"}],
minor: [
{ class: "LargeVarChar" , friendlyType: "Text" }
{ class: "LargeVarBinary" , friendlyType: "byte[]" }
]
},
{
major: "Bit",
width: 1,
Expand Down
8 changes: 6 additions & 2 deletions java/vector/src/main/codegen/templates/HolderReaderImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,16 @@ public void read(Nullable${name}Holder h) {
</#if>

<#if type.major == "VarLen">
<#if type.width == 4>
int length = holder.end - holder.start;
<#elseif type.width == 8>
int length = (int) (holder.end - holder.start);
</#if>
byte[] value = new byte [length];
holder.buffer.getBytes(holder.start, value, 0, length);
<#if minor.class == "VarBinary">
<#if minor.class == "VarBinary" || minor.class == "LargeVarBinary">
return value;
<#elseif minor.class == "VarChar">
<#elseif minor.class == "VarChar" || minor.class == "LargeVarChar">
Text text = new Text();
text.set(value);
return text;
Expand Down
Loading