try try_cast

2025-05-25  本文已影响0人  hehehehe
    conn.sql(f"""
        select ST_GeomFromText('point(1,1)', ignore_invalid := true)
    """).show()
    conn.sql(f""" 
        select TRY(ST_GeomFromText('POINT(1,2)'))
    """).show()
    conn.sql(f""" 
        select st_isvalid(try_cast('POINT(1, 1)' as geometry))
    """).show()
上一篇 下一篇

猜你喜欢

热点阅读