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

Revisit checkState() in HdfsTable#getTHdfsTable()

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: Impala 2.3.0
    • Fix Version/s: None
    • Component/s: Frontend
    • Labels:
      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

            • Assignee:
              bharathv Bharath Vissapragada
              Reporter:
              bharathv Bharath Vissapragada
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: