Abacn commented on PR #17728:
URL: https://github.com/apache/beam/pull/17728#issuecomment-1135972858

   This was a bug of cython Shadow fixed in upcoming v3.0 
(https://github.com/cython/cython/commit/3149eb8367e69f1558c73b0ebc266bdfba8abc0d).
 Before cython 3.0 is released  this patch looks needed. 
   
   In the translated c-code the helper function gives
   ```
     /* "apache_beam/runners/worker/operations.py":95
    * 
    * def _cast_to_operation(value):
    *   if cython.compiled:             # <<<<<<<<<<<<<<
    *     return cython.cast(Operation, value)
    *   else:
    */
     __pyx_t_1 = (1 != 0);
     if (__pyx_t_1) {
   
   ...
   
       goto __pyx_L0;
   
   /* ... */
     }
   
     /* ... */
     /*else*/ {
       ...
       goto __pyx_L0;
     }
   
     /* ... */
   
     /* function exit code */
     ...
     __pyx_L0:;
    ...
     return __pyx_r;
   }
   ```
   where the branching condition is constant in the compile time and should be 
eliminated by c compiler.
   


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