Class CaseExpr


  • public class CaseExpr
    extends Column
    Represents a CASE expression.

    To construct this object for a CASE expression, call the com.snowflake.snowpark_java.Functions.when. specifying a condition and the corresponding result for that condition. Then, call the when and otherwise methods to specify additional conditions and results.

    Since:
    0.12.0
    • Method Detail

      • when

        public CaseExpr when​(Column condition,
                             Column value)
        Appends one more WHEN condition to the CASE expression.
        Parameters:
        condition - The case condition
        value - The result value in the given condition
        Returns:
        The result case expression
        Since:
        0.12.0
      • otherwise

        public Column otherwise​(Column value)
        Sets the default result for this CASE expression.
        Parameters:
        value - The default value
        Returns:
        The result column
        Since:
        0.12.0