LakshSingla commented on code in PR #17411:
URL: https://github.com/apache/druid/pull/17411#discussion_r1815976614
##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/exec/MSQTasks.java:
##########
@@ -114,7 +114,13 @@ public static long
primaryTimestampFromObjectForInsert(final Object timestamp)
// be a long at execution time. So a nice user-friendly message isn't
needed here: it would only happen
// if the SQL layer is bypassed. Nice, friendly users wouldn't do that :)
final UnknownFault fault =
- UnknownFault.forMessage(StringUtils.format("Incorrect type for
[%s]", ColumnHolder.TIME_COLUMN_NAME));
+ UnknownFault.forMessage(
+ StringUtils.format(
+ "Incorrect type for column [%s]. Expected [Long] but got
[%s]. Please ensure the value is casted to [Long].",
Review Comment:
Extrapolations are incorrectly used -
1. Anything known is not an extrapolation. It is usually stuff that you
extract from the user input. `[Long]` should not be in extrapolation
2. The sentence should make sense if extrapolations are removed. Second
"[%s]" would break the flow of the sentence. Think of it like the `,,`
(apposition) in the English grammar. `
```suggestion
"Incorrect type for column [%s]. Expected LONG but got
type [%s]. Please ensure that the value is cast to LONG.",
```
--
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]