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
Conversation
KazydubB
commented
Jan 17, 2019
- 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.
@vvysotskyi please review. |
exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestCastFunctions.java
Show resolved
Hide resolved
exec/vector/src/main/java/org/apache/drill/exec/vector/UntypedNullVector.java
Show resolved
Hide resolved
@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<>(); |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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.
@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.
There was a problem hiding this 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
…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
…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