code: private void validateTableOptionShardingGranularity(TableDefinition tableDef, String optValue) {
          ShardingGranularity shardingGranularity = ShardingGranularity.fromString(optValue);
          Utils.require(shardingGranularity != null,
                        "Unrecognized 'sharding-granularity' value: " + optValue);
          
          // 'sharding-granularity' requires 'sharding-field'
          Utils.require(tableDef.getOption(CommonDefs.OPT_SHARDING_FIELD) != null,
                        "Option 'sharding-granularity' requires option 'sharding-field'");
      }
docs: Validate the table option "sharding-granularity".