Skip to content

Commit

Permalink
[hotfix][parquet] Fix dependences and variable name problems in FLINK…
Browse files Browse the repository at this point in the history
…-35702 (apache#25004)
  • Loading branch information
Stephen0421 authored Jul 2, 2024
1 parent 84165b2 commit cfa09e2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
5 changes: 5 additions & 0 deletions flink-connectors/flink-connector-hive/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1264,6 +1264,11 @@ under the License.
<relocation>
<pattern>org.apache.flink.runtime.util</pattern>
<shadedPattern>org.apache.flink.hive.shaded.util</shadedPattern>
<excludes>
<exclude>org.apache.flink.runtime.util.IntArrayList</exclude>
<exclude>org.apache.flink.runtime.util.BooleanArrayList</exclude>
<exclude>org.apache.flink.runtime.util.LongArrayList</exclude>
</excludes>
</relocation>
<relocation>
<pattern>org.apache.flink.formats.parquet</pattern>
Expand Down
14 changes: 8 additions & 6 deletions flink-formats/flink-parquet/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ under the License.
<optional>true</optional>
</dependency>

<!-- Runtime -->
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-runtime</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>

<!-- Parquet -->

<dependency>
Expand Down Expand Up @@ -273,12 +281,6 @@ under the License.
<scope>test</scope>
<type>test-jar</type>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-runtime</artifactId>
<version>2.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>

<dependencyManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.apache.flink.formats.parquet.vector.type.ParquetGroupField;
import org.apache.flink.formats.parquet.vector.type.ParquetPrimitiveField;
import org.apache.flink.table.data.columnar.vector.ColumnVector;
import org.apache.flink.table.data.columnar.vector.heap.AbstractHeapVector;
import org.apache.flink.table.data.columnar.vector.heap.HeapArrayVector;
import org.apache.flink.table.data.columnar.vector.heap.HeapMapVector;
import org.apache.flink.table.data.columnar.vector.heap.HeapRowVector;
Expand Down Expand Up @@ -244,13 +245,11 @@ private Tuple2<LevelDelegation, WritableColumnVector> readPrimitive(
return Tuple2.of(reader.getLevelDelegation(), writableColumnVector);
}

private static void setFieldNullFalg(boolean[] rowPosition, WritableColumnVector vector) {
int index = 0;
for (boolean isNullIndex : rowPosition) {
if (isNullIndex) {
private static void setFieldNullFalg(boolean[] nullFlags, AbstractHeapVector vector) {
for (int index = 0; index < vector.getLen() && index < nullFlags.length; index++) {
if (nullFlags[index]) {
vector.setNullAt(index);
}
index++;
}
}
}

0 comments on commit cfa09e2

Please sign in to comment.