add constructor for Table to deal with iterator (#1956)