Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRILL-6962: Function coalesce returns an Error when none of the columns in coalesce exist in a parquet file #1614

Closed
wants to merge 1 commit into from

Conversation

KazydubB
Copy link
Member

  • Updated UntypedNullVector to hold value count when vector is allocated and transfered to another one;
  • Updated RecordBatchLoader and DrillCursor to handle case when only UntypedNull values are present in RecordBatch (special case when data buffer is null but actual values are present);
  • Added functions to cast UntypedNull value to other types;
  • Moved UntypedReader, UntypedHolderReaderImpl and UntypedReaderImpl from org.apache.drill.exec.vector.complex.impl to org.apache.drill.exec.vector package.

@arina-ielchiieva
Copy link
Member

@vvysotskyi please review.

@KazydubB
Copy link
Member Author

@vvysotskyi I've addressed your comments, please take a look.

.unOrdered()
.baselineColumns("coal")
.baselineValues(new Object[] {null})
.go();
}
}

private static Map<String, Triple<TypeProtos.MinorType, Integer, Integer>> createCastTypeMap() {
Map<String, Triple<TypeProtos.MinorType, Integer, Integer>> typesMap = new HashMap<>();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to pass MaterializedField instance instead of passing TypeProtos.MinorType, Integer, Integer.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. made Map<String, TypeProtos.MajorType> instead.

@KazydubB
Copy link
Member Author

KazydubB commented Jan 23, 2019

@vvysotskyi thanks for your review. Updated.

…ns in coalesce exist in a parquet file

- Updated UntypedNullVector to hold value count when vector is allocated and transfered to another one;
- Updated RecordBatchLoader and DrillCursor to handle case when only UntypedNull values are present in RecordBatch (special case when data buffer is null but actual values are present);
- Added functions to cast UntypedNull value to other types for use in UDFs;
- Moved UntypedReader, UntypedHolderReaderImpl and UntypedReaderImpl from org.apache.drill.exec.vector.complex.impl to org.apache.drill.exec.vector package.
Copy link
Member

@vvysotskyi vvysotskyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making changes, +1

@asfgit asfgit closed this in 780a3fb Jan 25, 2019
lushuifeng pushed a commit to lushuifeng/drill that referenced this pull request Jun 21, 2019
…ns in coalesce exist in a parquet file

- Updated UntypedNullVector to hold value count when vector is allocated and transfered to another one;
- Updated RecordBatchLoader and DrillCursor to handle case when only UntypedNull values are present in RecordBatch (special case when data buffer is null but actual values are present);
- Added functions to cast UntypedNull value to other types for use in UDFs;
- Moved UntypedReader, UntypedHolderReaderImpl and UntypedReaderImpl from org.apache.drill.exec.vector.complex.impl to org.apache.drill.exec.vector package.

closes apache#1614
xiangt920 pushed a commit to xiangt920/drill that referenced this pull request Dec 26, 2019
…ns in coalesce exist in a parquet file

- Updated UntypedNullVector to hold value count when vector is allocated and transfered to another one;
- Updated RecordBatchLoader and DrillCursor to handle case when only UntypedNull values are present in RecordBatch (special case when data buffer is null but actual values are present);
- Added functions to cast UntypedNull value to other types for use in UDFs;
- Moved UntypedReader, UntypedHolderReaderImpl and UntypedReaderImpl from org.apache.drill.exec.vector.complex.impl to org.apache.drill.exec.vector package.

closes apache#1614
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants