anxkhn opened a new pull request, #5084:
URL: https://github.com/apache/calcite/pull/5084

   
   ## Jira Link
   
   Not required. Per the PR template and the contributing guide, a Jira issue 
is not
   needed for typos and cosmetic changes. This PR only fixes a misspelling in a
   user-facing exception message; there is no behavioral change.
   
   ## Changes Proposed
   
   Fixes a typo in the `IllegalArgumentException` thrown by
   `PigRelBuilder.scan(RelOptTable, String...)` when a Pig script schema does 
not
   match the database schema for a table.
   
   The message labelled the user-supplied schema line `Scrip schema:` instead of
   `Script schema:`. The surrounding text ("Pig script schema does not match 
database
   schema for table ...") and the adjacent `Database schema:` line make clear 
the
   intended word is "Script".
   
   Before:
   
   ```
   Pig script schema does not match database schema for table <names>.
         Scrip schema: <userSchema>
         Database schema: <systemSchema>
   ```
   
   After:
   
   ```
   Pig script schema does not match database schema for table <names>.
         Script schema: <userSchema>
         Database schema: <systemSchema>
   ```
   
   The change is a single word in one string literal
   (`piglet/src/main/java/org/apache/calcite/piglet/PigRelBuilder.java`); there 
is no
   functional change. `Scrip` (word boundary) now appears nowhere in the 
repository.
   
   No test is added: no existing test asserts this exception message, and 
pinning the
   exact wording would add brittleness rather than meaningful coverage. 
`./gradlew
   :piglet:autostyleCheck :piglet:checkstyleMain :piglet:compileJava` passes 
locally
   (JDK 21).
   
   ---
   
   ## Diff
   
   ```diff
   diff --git 
a/piglet/src/main/java/org/apache/calcite/piglet/PigRelBuilder.java 
b/piglet/src/main/java/org/apache/calcite/piglet/PigRelBuilder.java
   index df9f57a30..87c467209 100644
   --- a/piglet/src/main/java/org/apache/calcite/piglet/PigRelBuilder.java
   +++ b/piglet/src/main/java/org/apache/calcite/piglet/PigRelBuilder.java
   @@ -246,7 +246,7 @@ public RelBuilder scan(RelOptTable userSchema, String... 
tableNames) {
            // If both schemas are valid, they must be compatible
            throw new IllegalArgumentException(
                "Pig script schema does not match database schema for table " + 
names + ".\n"
   -                + "\t Scrip schema: " + 
userSchema.getRowType().getFullTypeString() + "\n"
   +                + "\t Script schema: " + 
userSchema.getRowType().getFullTypeString() + "\n"
                    + "\t Database schema: " + 
systemSchema.getRowType().getFullTypeString());
          }
   ```
   


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

Reply via email to