Surya Hebbar has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/22588 )

Change subject: IMPALA-13812: Fail query for certain errors related to AI 
functions
......................................................................


Patch Set 5:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/22588/5/be/src/exprs/ai-functions-ir.cc
File be/src/exprs/ai-functions-ir.cc:

http://gerrit.cloudera.org:8080/#/c/22588/5/be/src/exprs/ai-functions-ir.cc@55
PS5, Line 55: Ai
nit: AI


http://gerrit.cloudera.org:8080/#/c/22588/5/be/src/exprs/ai-functions.cc
File be/src/exprs/ai-functions.cc:

http://gerrit.cloudera.org:8080/#/c/22588/5/be/src/exprs/ai-functions.cc@71
PS5, Line 71:   do {                                                        \
            :     std::stringstream ss;                                     \
            :     ss << error_prefix << kudu_status.ToString();             \
            :     ctx->SetError(ss.str().c_str());                          \
            :   } while (false)
Possibly reuse the SET_ERROR macro here instead..


http://gerrit.cloudera.org:8080/#/c/22588/5/be/src/exprs/expr-test.cc
File be/src/exprs/expr-test.cc:

http://gerrit.cloudera.org:8080/#/c/22588/5/be/src/exprs/expr-test.cc@11395
PS5, Line 11395: result = AiFunctions::AiGenerateTextInternal<false, 
AiFunctions::AI_PLATFORM::OPEN_AI>(
               :       ctx, openai_endpoint, prompt, model, jceks_secret, 
invalid_json_params,
               :       impala_options, dry_run);
               :   EXPECT_TRUE(ctx->has_error());
               :   EXPECT_EQ(string(ctx->error_msg(), json_parse_error_len),
               :       AiFunctions::AI_GENERATE_TXT_COMMON_ERROR_PREFIX
               :           + AiFunctions::AI_GENERATE_TXT_JSON_PARSE_ERROR);
               :   EXPECT_EQ(result.ptr, nullptr);
               :   UdfTestHarness::CloseContext(ctx);
               :   ctx = CreateUdfTestContext(str_desc, v, nullptr, &pool);
Maybe a common method to compare StringVal with a given string, as this pattern 
repeats multiple times within the tests?



--
To view, visit http://gerrit.cloudera.org:8080/22588
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I639e48e64d62f7990cf9a3c35a59a0ee3a2c64e0
Gerrit-Change-Number: 22588
Gerrit-PatchSet: 5
Gerrit-Owner: Yida Wu <[email protected]>
Gerrit-Reviewer: Abhishek Rawat <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Surya Hebbar <[email protected]>
Gerrit-Reviewer: Yida Wu <[email protected]>
Gerrit-Comment-Date: Wed, 12 Mar 2025 22:34:08 +0000
Gerrit-HasComments: Yes

Reply via email to