Gabor Kaszab has posted comments on this change. ( http://gerrit.cloudera.org:8080/13680 )
Change subject: IMPALA-8665 Include extra info in error message when date cast fails ...................................................................... Patch Set 3: (3 comments) http://gerrit.cloudera.org:8080/#/c/13680/2/be/src/exprs/cast-functions-ir.cc File be/src/exprs/cast-functions-ir.cc: http://gerrit.cloudera.org:8080/#/c/13680/2/be/src/exprs/cast-functions-ir.cc@310 PS2, Line 310: DateVal CastFunctions::CastToDateVal(FunctionContext* ctx, const StringVal& val) { > I have already tested all the tests you mentioned. They all passed. The way Yes, please extend the affected tests to cover the whole error message. Update: Nevermind, I see you enhanced the tests. Thanks! http://gerrit.cloudera.org:8080/#/c/13680/2/be/src/exprs/cast-functions-ir.cc@316 PS2, Line 316: >SetError( > It's not working because StringVal.ptr is not a null-terminated string. Thanks for the explanation. http://gerrit.cloudera.org:8080/#/c/13680/3/testdata/workloads/functional-query/queries/QueryTest/date.test File testdata/workloads/functional-query/queries/QueryTest/date.test: http://gerrit.cloudera.org:8080/#/c/13680/3/testdata/workloads/functional-query/queries/QueryTest/date.test@125 PS3, Line 125: not a date I wonder if it would be more readable to put the incorrect input within quotation marks here. For example it would help with this input: select CAST(" " AS DATE); UDF ERROR: String to Date parse failed. Invalid string val: -- To view, visit http://gerrit.cloudera.org:8080/13680 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If800b7696515cd61afee27220c55ff2440a86f04 Gerrit-Change-Number: 13680 Gerrit-PatchSet: 3 Gerrit-Owner: Jiawei Wang <[email protected]> Gerrit-Reviewer: Attila Jeges <[email protected]> Gerrit-Reviewer: Gabor Kaszab <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Jiawei Wang <[email protected]> Gerrit-Comment-Date: Fri, 21 Jun 2019 06:59:12 +0000 Gerrit-HasComments: Yes
