Forbid slashes in datasource names. (#5937)

They are bad because datasources are used as paths on filesystems,
and slashes invariably make things get stored improperly.
This commit is contained in:
Gian Merlino 2018-07-05 09:49:16 -07:00 committed by Fangjin Yang
parent aa4987b871
commit 24c20b4734
1 changed files with 1 additions and 0 deletions

View File

@ -73,6 +73,7 @@ public class DataSchema
this.transformSpec = transformSpec == null ? TransformSpec.NONE : transformSpec;
Preconditions.checkArgument(!Strings.isNullOrEmpty(dataSource), "dataSource cannot be null or empty. Please provide a dataSource.");
Preconditions.checkArgument(!dataSource.contains("/"), "dataSource cannot contain the '/' character.");
this.dataSource = dataSource;
if (granularitySpec == null) {