cloud-fan commented on code in PR #46500:
URL: https://github.com/apache/spark/pull/46500#discussion_r1595576046


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/csv/UnivocityParser.scala:
##########
@@ -316,7 +316,7 @@ class UnivocityParser(
       throw BadRecordException(
         () => getCurrentInput,
         () => Array.empty,
-        QueryExecutionErrors.malformedCSVRecordError(""))
+        MalformedCSVRecordException(""))

Review Comment:
   This approach is like using a placeholder exception first and then replacing 
it with the actual error at a later phase. The current implementation needs a 
dedicate placeholder exception for each real error.
   
   Shall we make it more general? We can have a special wrapper exception, 
which does not have the cause field and can lazily produce the actual error. 
Just like the updated `BadRecordException` in the previous attempt.



-- 
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]

Reply via email to