[
https://issues.apache.org/jira/browse/DRILL-7403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16951309#comment-16951309
]
ASF GitHub Bot commented on DRILL-7403:
---------------------------------------
arina-ielchiieva commented on pull request #1871: DRILL-7403: lidate batch
checks, vector integretity in unit tests
URL: https://github.com/apache/drill/pull/1871#discussion_r334633755
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/validate/BatchValidator.java
##########
@@ -101,47 +290,90 @@ private void validateVector(ValueVector vector) {
}
}
- private void validateVariableWidthVector(String name, VariableWidthVector
vector, int entryCount) {
+ private void validateNullableVector(String name, NullableVector vector) {
+ int outerCount = vector.getAccessor().getValueCount();
+ ValueVector valuesVector = vector.getValuesVector();
+ int valueCount = valuesVector.getAccessor().getValueCount();
+ if (valueCount != outerCount) {
+ error(name, vector, String.format(
+ "Outer value count = %d, but inner value count = %d",
+ outerCount, valueCount));
+ }
+ verifyIsSetVector(vector, (UInt1Vector) vector.getBitsVector());
+ validateVector(name + "-values", valuesVector);
+ }
+
+ private void validateVariableWidthVector(String name, VariableWidthVector
vector) {
// Offsets are in the derived classes. Handle only VarChar for now.
if (vector instanceof VarCharVector) {
- validateVarCharVector(name, (VarCharVector) vector, entryCount);
+ validateVarCharVector(name, (VarCharVector) vector);
} else {
logger.debug("Don't know how to validate vector: " + name + " of class "
+ vector.getClass().getSimpleName());
Review comment:
Know it's not your code but since I saw this, could you please fix:
```suggestion
logger.debug("Don't know how to validate vector: {} of class {}",
name, vector.getClass().getSimpleName());
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Validate batch checks, vector integretity in unit tests
> -------------------------------------------------------
>
> Key: DRILL-7403
> URL: https://issues.apache.org/jira/browse/DRILL-7403
> Project: Apache Drill
> Issue Type: Improvement
> Reporter: Paul Rogers
> Assignee: Paul Rogers
> Priority: Minor
>
> Drill provides a {{BatchValidator}} that checks vectors. It is disabled by
> default. This enhancement adds more checks, including checks for row counts
> (of which there are surprisingly many.)
> Since most operators will fail if the check is enabled, this enhancement also
> adds a table to keep track of which operators pass the checks (and for which
> checks should be enabled) and those that still need work. This allows the
> checks to exist in the code, and to be enabled incrementally as we fix the
> various problems.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)