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

Scan with conjuncts but no materialized slots crashes Impalad

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • Impala 2.10.0
    • Impala 2.11.0
    • Backend

    Description

      The simple query

       select count(*) from tpch_parquet.lineitem where rand() = 10.0 

      will trigger the following DCHECK below in HdfsScanner::WriteTemplate():

      int HdfsScanner::WriteTemplateTuples(TupleRow* row, int num_tuples) {
        DCHECK_GE(num_tuples, 0);
        DCHECK_EQ(scan_node_->tuple_idx(), 0);
        DCHECK_EQ(conjunct_evals_->size(), 0); <<------
        if (num_tuples == 0 || template_tuple_ == NULL) return num_tuples;
      
        Tuple** row_tuple = reinterpret_cast<Tuple**>(row);
        for (int i = 0; i < num_tuples; ++i) row_tuple[i] = template_tuple_;
        return num_tuples;
      }
      

      The assumption in the scanner is that if there are no materialized slots (e.g. count star), there should be no conjuncts too but that doesn't always seems to be the case.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            kwho Michael Ho
            kwho Michael Ho
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment