diff --git a/matlab/src/matlab/+arrow/+array/+internal/+list/TableValidator.m b/matlab/src/matlab/+arrow/+array/+internal/+list/TableValidator.m index 88b09496e865d..76a74df48267d 100644 --- a/matlab/src/matlab/+arrow/+array/+internal/+list/TableValidator.m +++ b/matlab/src/matlab/+arrow/+array/+internal/+list/TableValidator.m @@ -66,7 +66,9 @@ function validateElement(obj, element) for ii=1:numVars var = element.(ii); - if ~istable(var) && ~iscolumn(var) + % In order to concatenate tables together later, require + % all non-tabular variables to be columnar or empty. + if ~istable(var) && (~iscolumn(var) || isempty(var)) id = "arrow:array:list:NonTabularVariablesMustBeColumnar"; msg = "Table variables must be columnar"; error(id, msg);