Skip to content

Commit

Permalink
Merge pull request yahoojapan#111 from koijima/bugfix_null_filter
Browse files Browse the repository at this point in the history
Bug fix on NULL filter.
  • Loading branch information
Jie211 authored Jun 23, 2020
2 parents 2811dfd + 68a8ac6 commit abfa0ad
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 32 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<groupId>jp.co.yahoo.yosegi</groupId>
<artifactId>yosegi</artifactId>
<version>1.1.1</version>
<version>1.1.2</version>
<packaging>jar</packaging>
<name>Yosegi</name>
<description>Yosegi package.</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,33 +101,8 @@ public boolean[] filter(
final boolean[] filterArray ) throws IOException {
switch ( filter.getFilterType() ) {
case NOT_NULL:
if ( columnType != ( (INullFilter)filter ).getTargetColumnType() ) {
return null;
}
for ( int i = 0 ; i < filterArray.length ; i++ ) {
if ( i < size() ) {
if ( dicIndexIntBuffer.get(i) != 0 ) {
filterArray[i] = true;
}
} else {
filterArray[i] = false;
}
}
return filterArray;
case NULL:
if ( columnType != ( (INullFilter)filter ).getTargetColumnType() ) {
return null;
}
for ( int i = 0 ; i < filterArray.length ; i++ ) {
if ( i < size() ) {
if ( dicIndexIntBuffer.get(i) == 0 ) {
filterArray[i] = true;
}
} else {
filterArray[i] = true;
}
}
return filterArray;
return null;
default:
return index.filter( filter , filterArray );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,12 +342,8 @@ public boolean[] filter(
final IFilter filter , final boolean[] filterArray ) throws IOException {
switch ( filter.getFilterType() ) {
case NOT_NULL:
return null;
case NULL:
if ( columnType != ( (INullFilter)filter ).getTargetColumnType() ) {
return null;
}
return new boolean[filterArray.length];
return null;
default:
return index.filter( filter , filterArray );
}
Expand Down

0 comments on commit abfa0ad

Please sign in to comment.