heavyai/rbc

`if/else` not working with `TextEncodingNone`

Closed this issue · 0 comments

tupui commented

This is failing

@heavydb("string(double)")
def classify_slope(slope):
    if slope <= 5:
        res = TextEncodingNone("low")
    elif 5 < slope < 15:
        res = TextEncodingNone("med")
    else:
        res = TextEncodingNone("high")
    
    return res

This is working

@heavydb("string(double)")
def classify_slope(slope):
    if slope <= 5:
        res = TextEncodingNone("low")
  
    if 5 < slope < 15:
        res = TextEncodingNone("med")

    if slope >= 15:
        res = TextEncodingNone("high")
    
    return res