panbingkun commented on PR #43274:
URL: https://github.com/apache/spark/pull/43274#issuecomment-1751975287

   > @panbingkun Your PR doesn't contain any changes in *.md. Just wonder, why?
   
   At present, the `sql-error-conditions.md` document is normal, with only one 
space at the tail. 
   However, for example, when we add an error class and use command to 
regenerate the `sql-error-conditions.md` file, it will generate an additional 
two spaces at the tail in the `sql-error-conditions.md` file. 
   The main purpose of this PR is to fix the automated generation mechanism.
   
   It can be reproduced through the following simple steps:
   - Remove the description of any error class from the file 
`sql-error-conditions.md`, for example: 
   
      <del> 
     ### BATCH_METADATA_NOT_FOUND
     
     [SQLSTATE: 
42K03](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation)
     
     Unable to find batch `<batchMetadataFile>`.
      </del>
   
   
   - Run the following command:
   ```
   SPARK_GENERATE_GOLDEN_FILES=1 build/sbt \
           "core/testOnly *SparkThrowableSuite -- -t \"Error classes match with 
document\""
   ```
   
   - Git will display differences:
      <img width="734" alt="image" 
src="https://github.com/apache/spark/assets/15246973/bb8abb7e-571d-4089-8766-19cead2ea773";>
   
   


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