vibhatha commented on code in PR #43077: URL: https://github.com/apache/arrow/pull/43077#discussion_r1694902323
########## java/vector/src/main/codegen/templates/PromotableWriter.java: ########## @@ -526,4 +538,36 @@ public int getValueCapacity() { public void close() throws Exception { getWriter().close(); } + + protected void setState(State state) { + this.state = state; + } + + protected void setType(MinorType type) { + this.type = type; + } + + protected void setUnionVector(UnionVector unionVector) { + this.unionVector = unionVector; + } + + protected void setWriter(FieldWriter writer) { + this.writer = writer; + } + + /** + * Convert the writer to a PromotableViewWriter. + * + * @return The writer as a PromotableViewWriter. + */ + public PromotableViewWriter toViewWriter() { + PromotableViewWriter promotableViewWriter = new PromotableViewWriter(unionVector, parentContainer, nullableStructWriterFactory); + promotableViewWriter.setPosition(position); + promotableViewWriter.setWriter(writer); + promotableViewWriter.setState(state); + promotableViewWriter.setUnionVector(unionVector); + promotableViewWriter.setType(MinorType.LISTVIEW); + promotableViewWriter.setPosition(idx()); + return promotableViewWriter; + } Review Comment: I haven't inlined them after previous comment, I will do it. Sorry about the delay. -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org