VectorAppender fails with OversizedAllocationException when appending to empty UnionVector
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 55/100
Direção de pesquisa
Comece pelo loop de VectorAppender.java em torno da linha 556 e inspecione UnionVector.getValueCapacity(), incluindo NonNullableStructVector.java em torno da linha 373. Execute a reprodução fornecida testAppendEmptyTargetUnionVector e compare a capacidade antes e depois de reAlloc(). Está concluído quando a adição a um UnionVector vazio for concluída sem OversizedAllocationException e preservar todos os cinco valores float.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Describe the bug, including details regarding any error messages, version, and platform.
Description:
When appending a UnionVector to an empty target UnionVector, this while loop runs infinitely until the exception occurs:
org.apache.arrow.vector.util.OversizedAllocationException: Unable to expand the buffer
It seems to be a issue with the UnionVector.getValueCapacity() method. Logging the capacity before and after calling reAlloc() shows that it's always 0.
Debugging further, it seems like the value capacity of the internalStruct in the UnionVector always returns 0 because it has no children so size is 0.
@Override
public int getValueCapacity() {
return Math.min(getTypeBufferValueCapacity(), internalStruct.getValueCapacity());
}
Steps to reproduce
@Test
public void testAppendEmptyTargetUnionVector() {
final int length = 5;
try (final UnionVector target = UnionVector.empty("target", allocator);
final UnionVector delta = UnionVector.empty("delta", allocator)) {
// populate the delta vector
delta.setType(0, Types.MinorType.FLOAT4);
delta.setType(1, Types.MinorType.FLOAT4);
delta.setType(2, Types.MinorType.FLOAT4);
delta.setType(3, Types.MinorType.FLOAT4);
delta.setType(4, Types.MinorType.FLOAT4);
Float4Vector deltaFloatVector = delta.getFloat4Vector();
deltaFloatVector.allocateNew();
ValueVectorDataPopulator.setVector(deltaFloatVector, 1f, 2f, 3f, 4f, 5f);
assertEquals(length, deltaFloatVector.getValueCount());
delta.setValueCount(length);
VectorAppender appender = new VectorAppender(target);
delta.accept(appender, null);
assertEquals(length, target.getValueCount());
for (int i = 0; i < length; i++) {
Object floatObj = target.getObject(i);
assertTrue(floatObj instanceof Float);
assertEquals(i+1, ((Float) floatObj).intValue());
}
}
}
This issue does not occur if any value is set in the target vector before appending.
- Linguagem predominante
- Java
- Estrelas
- 95
- Forks
- 154
- Merge médio
- 2d 10h
- PRs com merge (30d)
- 11
Preparar o ambiente
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de apache/arrow-java
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
apache/arrow-java#1261 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
apache/arrow-java#1236 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
apache/arrow-java#1230 ·
Mantenedores costumam responder em até 1 dia
-
Type: bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
apache/arrow-java#1205 ·
Mantenedores costumam responder em até 1 dia
-
Type: bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
apache/arrow-java#1196 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
Todas as issues de apache/arrow-java
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
checkstyle/checkstyle#21755 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
Mantenedores costumam responder em até 1 dia
-
agentic-workflows
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
github/copilot-sdk#2782 ·
Mantenedores costumam responder em até 1 dia
-
documentation Good for newcomer quick win
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
CodeForPhilly/benefit-decision-toolkit#519 ·
Mantenedores costumam responder em até 1 dia
-
area-deployment triage:bot-seen triage:needs-human
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
microsoft/aspire#20533 · 1 comentário ·
Mantenedores costumam responder em até 1 dia