Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-2690

Revisit checkState() in HdfsTable#getTHdfsTable()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Won't Fix
    • Impala 2.3.0
    • None
    • Frontend
    • None

    Description

      Following is a code snippet in HdfsTable#getTHdfsTable()

      /**
         * Create a THdfsTable corresponding to this HdfsTable. If includeFileDesc is true,
         * then then all partitions and THdfsFileDescs of each partition should be included.
         * Otherwise, don't include any THdfsFileDescs, and include only those partitions in
         * the refPartitions set (the backend doesn't need metadata for unreferenced
         * partitions).
         */
        private THdfsTable getTHdfsTable(boolean includeFileDesc, Set<Long> refPartitions) {
          // includeFileDesc implies all partitions should be included (refPartitions == null).
          Preconditions.checkState(!includeFileDesc || refPartitions == null);
      

      As per the javadoc, checkState() can be more stricter where refPartitions be != null if !includeFileDesc . However adding it breaks insert into table partition() values() statement. Either the javadoc is wrong or the caller is setting wrong refPartitions.

      Attachments

        Activity

          People

            bharathv Bharath Vissapragada
            bharathv Bharath Vissapragada
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: