You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gluten.apache.org by "wForget (via GitHub)" <gi...@apache.org> on 2025/03/17 02:18:19 UTC

[I] [VL] Cast from DECIMAL(10, 2) to TIMESTAMP is not supported [incubator-gluten]

wForget opened a new issue, #9019:
URL: https://github.com/apache/incubator-gluten/issues/9019

   ### Backend
   
   VL (Velox)
   
   ### Bug description
   
   I found an error through fuzz-testing: https://github.com/wForget/fuzz-test-spark-native/issues/160
   
   error message:
   
   ```
   [ERROR] Query failed in native engine gluten: Job aborted due to stage failure: Task 0 in stage 2304.0 failed 1 times, most recent failure: Lost task 0.0 in stage 2304.0 (TID 1606) (fv-az1758-193.vo1scjuza2hupagbdr52ddpx1h.cx.internal.cloudapp.net executor driver): org.apache.gluten.exception.GlutenException: org.apache.gluten.exception.GlutenException: Error during calling Java code from native code: org.apache.gluten.exception.GlutenException: org.apache.gluten.exception.GlutenException: Exception: VeloxUserError
   Error Source: USER
   Error Code: UNSUPPORTED
   Reason: Cast from DECIMAL(10, 2) to TIMESTAMP is not supported
   Retriable: False
   Context: Top-level Expression: try_cast((n0_0) as TIMESTAMP)
   Function: applyDecimalToPrimitiveCast
   File: /work/ep/build-velox/build/velox_ep/./velox/expression/CastExpr-inl.h
   Line: 673
   Stack trace:
   # 0  _ZN8facebook5velox7process10StackTraceC1Ei
   # 1  _ZN8facebook5velox14VeloxExceptionC1EPKcmS3_St17basic_string_viewIcSt11char_traitsIcEES7_S7_S7_bNS1_4TypeES7_
   # 2  _ZN8facebook5velox6detail14veloxCheckFailINS0_14VeloxUserErrorERKSsEEvRKNS1_18VeloxCheckFailArgsET0_
   # 3  _ZN8facebook5velox4exec8CastExpr27applyDecimalToPrimitiveCastIlEESt10shared_ptrINS0_10BaseVectorEERKNS0_17SelectivityVectorERKS5_RNS1_7EvalCtxERKS4_IKNS0_4TypeEESI_
   # 4  _ZN8facebook5velox4exec8CastExpr11applyPeeledERKNS0_17SelectivityVectorERKNS0_10BaseVectorERNS1_7EvalCtxERKSt10shared_ptrIKNS0_4TypeEESG_RSB_IS6_E
   # 5  _ZN8facebook5velox4exec8CastExpr5applyERKNS0_17SelectivityVectorERKSt10shared_ptrINS0_10BaseVectorEERNS1_7EvalCtxERKS6_IKNS0_4TypeEESH_RS8_
   # 6  _ZN8facebook5velox4exec8CastExpr15evalSpecialFormERKNS0_17SelectivityVectorERNS1_7EvalCtxERSt10shared_ptrINS0_10BaseVectorEE
   # 7  _ZN8facebook5velox4exec4Expr24evalSpecialFormWithStatsERKNS0_17SelectivityVectorERNS1_7EvalCtxERSt10shared_ptrINS0_10BaseVectorEE
   # 8  _ZN8facebook5velox4exec4Expr11evalAllImplERKNS0_17SelectivityVectorERNS1_7EvalCtxERSt10shared_ptrINS0_10BaseVectorEE
   # 9  _ZN8facebook5velox4exec4Expr7evalAllERKNS0_17SelectivityVectorERNS1_7EvalCtxERSt10shared_ptrINS0_10BaseVectorEE
   # 10 _ZN8facebook5velox4exec4Expr4evalERKNS0_17SelectivityVectorERNS1_7EvalCtxERSt10shared_ptrINS0_10BaseVectorEEPKNS1_7ExprSetE
   # 11 _ZN8facebook5velox4exec7ExprSet4evalEiibRKNS0_17SelectivityVectorERNS1_7EvalCtxERSt6vectorISt10shared_ptrINS0_10BaseVectorEESaISB_EE
   # 12 _ZN8facebook5velox4exec13FilterProject7projectERKNS0_17SelectivityVectorERNS1_7EvalCtxE
   # 13 _ZN8facebook5velox4exec13FilterProject9getOutputEv
   # 14 _ZZN8facebook5velox4exec6Driver11runInternalERSt10shared_ptrIS2_ERS3_INS1_13BlockingStateEERS3_INS0_9RowVectorEEENKUlvE8_clEv
   # 15 _ZN8facebook5velox4exec6Driver11runInternalERSt10shared_ptrIS2_ERS3_INS1_13BlockingStateEERS3_INS0_9RowVectorEE
   # 16 _ZN8facebook5velox4exec6Driver4nextEPN5folly10SemiFutureINS3_4UnitEEE
   # 17 _ZN8facebook5velox4exec4Task4nextEPN5folly10SemiFutureINS3_4UnitEEE
   # 18 _ZN6gluten24WholeStageResultIterator4nextEv
   # 19 Java_org_apache_gluten_vectorized_ColumnarBatchOutIterator_nativeHasNext
   # 20 0x00007feb799c3b68
   
   ```
   
   table schema:
   
   ```
   create table test0(c35 Decimal(10,2))
   ```
   
   query:
   
   ```
   SELECT c35, cast(c35 as TIMESTAMP), try_cast(c35 as TIMESTAMP) FROM test0 ORDER BY c35;
   ```
   
   ### Spark version
   
   Spark-3.5.x
   
   ### Spark configurations
   
   _No response_
   
   ### System information
   
   _No response_
   
   ### Relevant logs
   
   ```bash
   
   ```


-- 
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: commits-unsubscribe@gluten.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [I] [VL] Cast from DECIMAL(10, 2) to TIMESTAMP is not supported [incubator-gluten]

Posted by "PHILO-HE (via GitHub)" <gi...@apache.org>.
PHILO-HE commented on issue #9019:
URL: https://github.com/apache/incubator-gluten/issues/9019#issuecomment-2728207116

   @wForget, please add a check to make the validation fail for such cases.


-- 
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: commits-unsubscribe@gluten.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [I] [VL] Cast from DECIMAL(10, 2) to TIMESTAMP is not supported [incubator-gluten]

Posted by "PHILO-HE (via GitHub)" <gi...@apache.org>.
PHILO-HE closed issue #9019: [VL] Cast from DECIMAL(10, 2) to TIMESTAMP is not supported
URL: https://github.com/apache/incubator-gluten/issues/9019


-- 
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: commits-unsubscribe@gluten.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [I] [VL] Cast from DECIMAL(10, 2) to TIMESTAMP is not supported [incubator-gluten]

Posted by "wForget (via GitHub)" <gi...@apache.org>.
wForget commented on issue #9019:
URL: https://github.com/apache/incubator-gluten/issues/9019#issuecomment-2728056971

   This issue seems to have been introduced by #8593. cc @PHILO-HE
   
   shortDecimal.isBigint is true?
   
   https://github.com/facebookincubator/velox/blob/d00d011139bda95327ba18aaed2c6fb0859d2f5e/velox/type/Type.h#L810
   
   https://github.com/facebookincubator/velox/blob/d00d011139bda95327ba18aaed2c6fb0859d2f5e/velox/type/Type.h#L392-L394


-- 
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: commits-unsubscribe@gluten.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org