github-actions[bot] commented on code in PR #70345:
URL: https://github.com/apache/doris/pull/70345#discussion_r4548193793
##########
be/src/exprs/function/function_python_udf.cpp:
##########
@@ -71,6 +72,8 @@ Status PythonFunctionCall::open(FunctionContext* context,
func_meta.input_types = _argument_types;
func_meta.return_type = _return_type;
func_meta.client_type = PythonClientType::UDF;
+ func_meta.datetime_naive = PythonUDFMeta::uses_naive_datetime(_fn);
+ func_meta.timezone = context->state()->timezone();
Review Comment:
[P2] Set the point-query timezone before opening Python clients
Short-circuit point queries open their output expressions in Reusable::init
while RuntimeState still has the default +08:00 zone; PointQueryExecutor::init
only installs the request timezone afterwards. This assignment therefore fixes
the Python metadata to +08:00, while execute_impl now builds its input batch
using the updated session timezone. For a unique-key MoW row-store table, SET
time_zone='UTC'; SELECT py_tz_identity(tz) FROM t WHERE k=1 (with a
TIMESTAMPTZ(6) argument) reaches this path and FlightServer.check_schema
rejects timestamp[us, tz=UTC] against timestamp[us, tz=+08:00]. Initialize the
request timezone before opening these expressions, and handle timezone changes
when reusing a prepared point-query client.
--
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]