You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
create temp function `assert`(expected ANY TYPE, actual ANY TYPE)
as (
if(expected = actual, null, error(format("Expected %T: %T", expected, actual)))
);
select assert('hoge', 'hoge')
関数をひとつはさむことで、タイプチェックにもなる
The text was updated successfully, but these errors were encountered:
値の比較を行いたい時にassertのような関数が一つあると便利である。
BigQueryにはerror関数があるがこれをラップすることで次のようなassertを用意すると便利である
関数をひとつはさむことで、タイプチェックにもなる
The text was updated successfully, but these errors were encountered: