Github user hbdeshmukh commented on a diff in the pull request:

    https://github.com/apache/incubator-quickstep/pull/217#discussion_r107975596
  
    --- Diff: query_optimizer/resolver/Resolver.cpp ---
    @@ -724,6 +708,25 @@ const S::PartitionSchemeHeader* 
Resolver::resolvePartitionClause(
         THROW_SQL_ERROR_AT(partition_type_string) << "Unrecognized partition 
type: " << partition_type;
       }
     
    +  
proto->set_num_partitions(partition_clause->num_partitions()->long_value());
    +
    +  std::unordered_set<attribute_id> unique_partition_attrs;
    +  for (const ParseString &partition_attribute_name : 
partition_clause->attribute_name_list()) {
    +    const attribute_id attr_id = 
GetAttributeIdFromName(create_table_statement.attribute_definition_list(),
    +                                                        
partition_attribute_name.value());
    +    if (attr_id == kInvalidAttributeID) {
    +      THROW_SQL_ERROR_AT(&partition_attribute_name)
    +          << "The given attribute was not found.";
    +    } else if (unique_partition_attrs.count(attr_id)) {
    --- End diff --
    
    For readability, can we change this to ``count > 0`` or use ``find`` 
instead? 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to