github-actions[bot] commented on code in PR #68614:
URL: https://github.com/apache/doris/pull/68614#discussion_r4147111153
##########
fe/fe-core/src/main/java/org/apache/doris/service/arrowflight/FlightSqlSchemaHelper.java:
##########
@@ -163,6 +167,47 @@ private static ArrowType getArrowType(PrimitiveType
primitiveType, Integer preci
}
}
+ static Field withDorisTypeMetadata(Field field, Type type) {
+ List<Field> children = new ArrayList<>(field.getChildren());
+ if (type.isArrayType()) {
Review Comment:
[P2] Normalize the serialized shape of AGG_STATE results too. A parallel
Flight query projecting `array_agg_state(x)` where `x` is nullable LARGEINT
exposes an Arrow list: BE unwraps the state to `ARRAY<nullable LARGEINT>`. New
BEs mark the list item `doris_type=LARGEINT`, while old BEs omit it. The
planned FE type remains `AggStateType`, so this ARRAY-only recursion never
fills the old endpoint's marker and `fetchArrowFlightSchema` rejects mixed
endpoints. The earlier declared `ARRAY<LARGEINT>` fix does not cover this
wrapper; derive the state function's serialized shape before comparing schemas.
##########
be/src/exec/operator/memory_scratch_sink_operator.cpp:
##########
@@ -103,8 +103,7 @@ Status MemoryScratchSinkOperatorX::sink_impl(RuntimeState*
state, Block* input_b
RETURN_IF_ERROR(VExprContext::get_output_block_after_execute_exprs(
local_state._output_vexpr_ctxs, *input_block, &block));
}
- DorisArrowBlockConvertor converter(block, state->timezone(), _timezone_obj,
- /*datetime_naive=*/true);
+ ArrowFlightArrowBlockConvertor converter(block, state->timezone(),
_timezone_obj);
Review Comment:
[P2] Preserve the ordinary Arrow value path for memory scratch results. This
sink serves the table-scan `get_next` API, where Doris-valid DATETIMEV2 rows
can contain year 0000. `ArrowFlightArrowBlockConvertor` runs
`FlightTimestampValidator`, which rejects timestamps before 0001; conversion
then fails before the valid row is queued for `get_next`. The adjacent
timestamp test confirms `DorisArrowBlockConvertor` writes the same value with
the same naive schema. Keep that schema policy without applying Flight's
client-range check to this non-Flight sink.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]