cboumalh commented on code in PR #51298: URL: https://github.com/apache/spark/pull/51298#discussion_r2308307867
########## common/utils/src/main/resources/error/error-conditions.json: ########## @@ -5560,6 +5560,18 @@ ], "sqlState" : "428EK" }, + "THETA_INVALID_INPUT_SKETCH_BUFFER" : { + "message" : [ + "Invalid call to <function>; only valid Theta sketch buffers are supported as inputs (such as those produced by the `theta_sketch_agg` function)." + ], + "sqlState" : "22546" + }, + "THETA_INVALID_LG_NOM_ENTRIES" : { + "message" : [ + "Invalid Theta sketch call; the `lgNomEntries` value must be between <min> and <max>, inclusive: <value>." Review Comment: I agree with the idea, only concern is the function that throws this error is in the ThetaSketchUtils class [here](https://github.com/apache/spark/blob/e792ac2802ce8efbb772c33612429461d2f94ca5/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/ThetaSketchUtils.scala#L42). This function is unaware of the Theta sketch function calling it. Would we want the function name (prettyName) to be a parameter to the utils function? Or would something like `Invalid call to Theta sketch` be enough? -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org