[ngrams] fix sql query to return arrays without NULL

This was the case before
parent d89065b9
Pipeline #7972 failed with stages
in 58 minutes and 57 seconds