This logic should be in the `build_table` macro I think.