weiqingy commented on code in PR #2063:
URL: https://github.com/apache/auron/pull/2063#discussion_r2903165542


##########
auron-flink-extension/auron-flink-runtime/src/main/java/org/apache/auron/flink/arrow/vectors/ArrowTimeColumnVector.java:
##########
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.auron.flink.arrow.vectors;
+
+import org.apache.arrow.vector.TimeMicroVector;
+import org.apache.flink.table.data.columnar.vector.IntColumnVector;
+import org.apache.flink.util.Preconditions;
+
+/**
+ * A Flink {@link IntColumnVector} backed by an Arrow {@link TimeMicroVector}.
+ *
+ * <p>This wrapper delegates all reads to the underlying Arrow vector, 
providing zero-copy access
+ * to Arrow data from Flink's columnar batch execution engine. {@link 
TimeMicroVector} stores time
+ * values as microseconds since midnight ({@code long}), which are converted 
to milliseconds
+ * ({@code int}) to match Flink's internal TIME representation. This reverses 
the writer's
+ * conversion from milliseconds to microseconds.
+ */
+public final class ArrowTimeColumnVector implements IntColumnVector {
+
+    private TimeMicroVector vector;
+
+    /**
+     * Creates a new wrapper around the given Arrow {@link TimeMicroVector}.
+     *
+     * @param vector the Arrow vector to wrap, must not be null
+     */
+    public ArrowTimeColumnVector(TimeMicroVector vector) {

Review Comment:
    Good question. The reader reads output from the native engine (DataFusion), 
which uses `Timestamp::Microsecond` internally for all temporal types — so the 
Arrow vectors produced are always microsecond-precision regardless of the 
declared Flink precision. Updated the code comments and class Javadoc to 
clarify this: they now reference "the native engine (DataFusion)" instead of 
"the writer" to make the coupling clearer.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to