Skip to content

Commit

Permalink
Create exception only when it is neccessary
Browse files Browse the repository at this point in the history
  • Loading branch information
urosstan-db committed Jun 27, 2024
1 parent 4fc2910 commit a923487
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,15 @@ object ResolveDefaultColumns extends QueryErrorsBase
*
* The column "DEFAULT" will be resolved to the default value expression defined for the column of
* the assignment key.
*
* IMPORTANT: The 'invalidColumnDefaultException' argument must be lazy until the exception
* is actually thrown, because the instantiation of SparkThrowable exception results in
* reading the file error-classes to format exception message.
*/
def resolveColumnDefaultInAssignmentValue(
key: Expression,
value: Expression,
invalidColumnDefaultException: Throwable): Expression = {
invalidColumnDefaultException: => Throwable): Expression = {
key match {
case attr: AttributeReference =>
value match {
Expand Down

0 comments on commit a923487

Please sign in to comment.