pineappleBest123 opened a new pull request, #49:
URL: https://github.com/apache/asterixdb/pull/49

     ## Problem
   
     When a SQL++ query uses implicit cross join syntax (e.g., `FROM customers, 
orders`
     without an explicit join condition), `SimpleUnnestToProductRule` rewrites 
the unnest
     pipeline into an `InnerJoinOperator` with a constant `TRUE` condition. 
However, no
     warning is emitted to alert the user that a cross product is being 
performed.
   
     By contrast, an explicit `JOIN ... ON TRUE` already triggers a 
`CROSS_PRODUCT_JOIN`
     warning through `JoinUtils.warnIfCrossProduct()`. This inconsistency means 
users of
     the implicit syntax receive no feedback about potentially expensive cross 
products,
     which can lead to unexpected performance issues or incorrect query results.
   
     ## Changes
   
     **`JoinUtils.java`**
     - Changed `warnIfCrossProduct()` from `private static` to `public static` 
so it can
       be called from outside the class.
   
     **`SimpleUnnestToProductRule.java`**
     - Added `import` for `JoinUtils`.
     - Added a call to `JoinUtils.warnIfCrossProduct()` immediately after the 
cross product
       join operator is constructed, consistent with how explicit joins are 
handled.
   
     ## Testing
   
     - `mvn compile` passes on the `algebricks-rewriter` module.
     - `mvn test` passes (BUILD SUCCESS) on the `algebricks-rewriter` module.
   
     ## Related
   
     - JIRA: https://issues.apache.org/jira/browse/ASTERIXDB-3021
   
   


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