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

    https://github.com/apache/incubator-hawq/pull/845#discussion_r76369429
  
    --- Diff: src/backend/cdb/cdbdatalocality.c ---
    @@ -3791,12 +3791,27 @@ run_allocation_algorithm(SplitAllocResult *result, 
List *virtual_segments, Query
                targetPolicy = GpPolicyFetch(CurrentMemoryContext, myrelid);
                bool isRelationHash = is_relation_hash(targetPolicy);
     
    +           int fileCountInRelation = list_length(rel_data->files);
    +           bool FileCountBucketNumMismatch = false;
    +           if (targetPolicy->bucketnum > 0) {
    +             FileCountBucketNumMismatch = fileCountInRelation %
    +               targetPolicy->bucketnum == 0 ? false : true;
    +           }
    +           if (FileCountBucketNumMismatch && 
!allow_file_count_bucket_num_mismatch) {
    +             elog(ERROR, "file count %d in catalog is not in proportion to 
the bucket "
    +                 "number %d of hash table with oid=%u, some data may be 
lost, if you "
    +                 "still want to continue the query by considering the 
table as random, set GUC "
    --- End diff --
    
    You can force running the query by viewing the table as randomly 
distributed table. set GUC allow_file_count_bucket_num_mismatch on to enable 
this feature.


---
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