goccy/go-zetasqlite

`NULLIF` panics when `expr` is null

ohaibbq opened this issue · 0 comments

SELECT NULLIF(null, 0);

Expected

col1
null

Actual

panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x100e7fae2]

goroutine 14 [running]:
panic({0x1021da500?, 0x103a81230?})
	/usr/local/Cellar/go/1.21.6/libexec/src/runtime/panic.go:914 +0x21f
github.com/goccy/go-zetasqlite/internal.NULLIF({0x0, 0x0}, {0x1026acd80?, 0x10389fac0?})