Skip to content

Conversation

@Yulei-Yang
Copy link
Contributor

@Yulei-Yang Yulei-Yang commented May 16, 2024

Proposed changes

Steps to reproduce:

  1. create a table test_table contains a timestamp type column which named create_time, and insert some rows.
  2. create a doris jdbc catalog pointer the above mysql server.
  3. run doris sql: set enable_nereids_planner=false; select case when create_time = '0000-00-00 00:00:00' then '' else create_time end from jdbc.db.test_table;

then you will got be core error:
ERROR 1105 (HY000): RpcException, msg: org.apache.doris.rpc.RpcException: io.grpc.StatusRuntimeException: UNAVAILABLE: Network closed for unknown reason

error in be.out

 1# 0x00007F3A6DD33400 in /lib64/libc.so.6
 2# gsignal in /lib64/libc.so.6
 3# abort in /lib64/libc.so.6
 4# __gnu_cxx::__verbose_terminate_handler() [clone .cold] at ../../../../libstdc++-v3/libsupc++/vterminate.cc:75
 5# __cxxabiv1::__terminate(void (*)()) at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:48
 6# 0x00005588299AADC1 in /data/d12/output/be/lib/doris_be
 7# 0x00005588299AAF14 in /data/d12/output/be/lib/doris_be
 8# 0x0000558824A99D2E in /data/d12/output/be/lib/doris_be
 9# 0x0000558824A99E86 in /data/d12/output/be/lib/doris_be
10# doris::Status doris::vectorized::FunctionCase<false, true>::execute_get_when_null<doris::vectorized::ColumnString>(std:
:shared_ptr<doris::vectorized::IDataType const> const&, doris::vectorized::Block&, std::vector<unsigned long, std::allocato
r<unsigned long> > const&, unsigned long, unsigned long) [clone .isra.0] at /data/d12/be/src/vec/functions/function_case.h:
354
11# doris::vectorized::FunctionCase<false, true>::execute_impl(doris_udf::FunctionContext*, doris::vectorized::Block&, std:
:vector<unsigned long, std::allocator<unsigned long> > const&, unsigned long, unsigned long) at /data/d12/be/src/vec/functi
ons/function_case.h:377
12# doris::vectorized::PreparedFunctionImpl::execute_without_low_cardinality_columns(doris_udf::FunctionContext*, doris::ve
ctorized::Block&, std::vector<unsigned long, std::allocator<unsigned long> > const&, unsigned long, unsigned long, bool) at
 /data/d12/be/src/vec/functions/function.cpp:244
13# doris::vectorized::PreparedFunctionImpl::execute(doris_udf::FunctionContext*, doris::vectorized::Block&, std::vector<un
signed long, std::allocator<unsigned long> > const&, unsigned long, unsigned long, bool) at /data/d12/be/src/vec/functions/
function.cpp:267
14# doris::vectorized::VCaseExpr::execute(doris::vectorized::VExprContext*, doris::vectorized::Block*, int*) at /data/d12/be/src/vec/exprs/vcase_expr.cpp:90
15# doris::vectorized::VExprContext::get_output_block_after_execute_exprs(std::vector<doris::vectorized::VExprContext*, std::allocator<doris::vectorized::VExprContext*> > const&, doris::vectorized::Block const&, doris::Status&) at /data/d12/be/src/vec/exprs/vexpr_context.cpp:148
16# doris::vectorized::VMysqlResultWriter::append_block(doris::vectorized::Block&) at /data/d12/be/src/vec/sink/vmysql_result_writer.cpp:459
17# doris::vectorized::VResultSink::send(doris::RuntimeState*, doris::vectorized::Block*) at /data/d12/be/src/vec/sink/vresult_sink.cpp:96

while when using nereids planer,
fe throw analysis error: ERROR 1105 (HY000): errCode = 2, detailMessage = Unexpected exception: Table name [jdbc2.db1.mc_work_contact_employee_1] is invalid.

so make legacy planner act like nereids.

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@github-actions github-actions bot added the area/planner Issues or PRs related to the query planner label May 16, 2024
Copy link
Contributor

@cambyzju cambyzju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions github-actions bot added approved Indicates a PR has been approved by one committer. reviewed labels May 16, 2024
@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

Copy link
Contributor

@lide-reed lide-reed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lide-reed lide-reed merged commit 8ff7689 into apache:branch-1.2-lts May 16, 2024
@Yulei-Yang Yulei-Yang deleted the fix_jdbc_datetime_parse_exception branch May 16, 2024 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. area/planner Issues or PRs related to the query planner reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants