Source:
<code>public TableMetadata( @JsonProperty("owner") String owner, @JsonProperty("tableType") String tableType, @JsonProperty("dataColumns") List<Column> dataColumns, @JsonProperty("partitionColumns") List<Column> partitionColumns, @JsonProperty("parameters") Map<String, String> parameters, @JsonProperty("storageFormat") Optional<HiveStorageFormat> storageFormat, @JsonProperty("bucketProperty") Optional<HiveBucketProperty> bucketProperty, @JsonProperty("serdeParameters") Map<String, String> serdeParameters, @JsonProperty("externalLocation") Optional<String> externalLocation, @JsonProperty("viewOriginalText") Optional<String> viewOriginalText, @JsonProperty("viewExpandedText") Optional<String> viewExpandedText, @JsonProperty("columnStatistics") Map<String, HiveColumnStatistics> columnStatistics) { this.owner = requireNonNull(owner, "owner is null"); this.tableType = requireNonNull(tableType, "tableType is null"); this.dataColumns = ImmutableList.copyOf(requireNonNull(dataColumns, "dataColumns is null")); this.partitionColumns = ImmutableList.copyOf(requireNonNull(partitionColumns, "partitionColumns is null")); this.parameters = ImmutableMap.copyOf(requireNonNull(parameters, "parameters is null")); this.storageFormat = requireNonNull(storageFormat, "storageFormat is null"); this.bucketProperty = requireNonNull(bucketProperty, "bucketProperty is null"); this.serdeParameters = requireNonNull(serdeParameters, "serdeParameters is null"); this.externalLocation = requireNonNull(externalLocation, "externalLocation is null"); if (tableType.equals(TableType.EXTERNAL_TABLE.name())) { checkArgument(externalLocation.isPresent(), "External location is required for external tables"); } else { checkArgument(!externalLocation.isPresent(), "External location is only allowed for external tables"); } this.viewOriginalText = requireNonNull(viewOriginalText, "viewOriginalText is null"); this.viewExpandedText = requireNonNull(viewExpandedText, "viewExpandedText is null"); this.columnStatistics = ImmutableMap.copyOf(requireNonNull(columnStatistics, "columnStatistics is null")); <START> checkArgument(partitionColumns.isEmpty() || columnStatistics.isEmpty(), "columnStatistics is not empty and the table is partitioned"); <END> }</code><technical_language>"column statistics set for partitioned table"</technical_language>

Target:
public TableMetadata( @JsonProperty("owner") String owner, @JsonProperty("tableType") String tableType, @JsonProperty("dataColumns") List<Column> dataColumns, @JsonProperty("partitionColumns") List<Column> partitionColumns, @JsonProperty("parameters") Map<String, String> parameters, @JsonProperty("storageFormat") Optional<HiveStorageFormat> storageFormat, @JsonProperty("bucketProperty") Optional<HiveBucketProperty> bucketProperty, @JsonProperty("serdeParameters") Map<String, String> serdeParameters, @JsonProperty("externalLocation") Optional<String> externalLocation, @JsonProperty("viewOriginalText") Optional<String> viewOriginalText, @JsonProperty("viewExpandedText") Optional<String> viewExpandedText, @JsonProperty("columnStatistics") Map<String, HiveColumnStatistics> columnStatistics) { this.owner = requireNonNull(owner, "owner is null"); this.tableType = requireNonNull(tableType, "tableType is null"); this.dataColumns = ImmutableList.copyOf(requireNonNull(dataColumns, "dataColumns is null")); this.partitionColumns = ImmutableList.copyOf(requireNonNull(partitionColumns, "partitionColumns is null")); this.parameters = ImmutableMap.copyOf(requireNonNull(parameters, "parameters is null")); this.storageFormat = requireNonNull(storageFormat, "storageFormat is null"); this.bucketProperty = requireNonNull(bucketProperty, "bucketProperty is null"); this.serdeParameters = requireNonNull(serdeParameters, "serdeParameters is null"); this.externalLocation = requireNonNull(externalLocation, "externalLocation is null"); if (tableType.equals(TableType.EXTERNAL_TABLE.name())) { checkArgument(externalLocation.isPresent(), "External location is required for external tables"); } else { checkArgument(!externalLocation.isPresent(), "External location is only allowed for external tables"); } this.viewOriginalText = requireNonNull(viewOriginalText, "viewOriginalText is null"); this.viewExpandedText = requireNonNull(viewExpandedText, "viewExpandedText is null"); this.columnStatistics = ImmutableMap.copyOf(requireNonNull(columnStatistics, "columnStatistics is null")); checkArgument(partitionColumns.isEmpty() || columnStatistics.isEmpty(), "column statistics cannot be set for partitioned table"); }