Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
strategy:
matrix:
arch: [amd64]
rust: [stable]
rust: [nightly-2021-07-04]
container:
image: ${{ matrix.arch }}/rust
env:
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
strategy:
matrix:
arch: [amd64]
rust: [stable]
rust: [nightly-2021-07-04]
container:
image: ${{ matrix.arch }}/rust
env:
Expand Down Expand Up @@ -126,7 +126,7 @@ jobs:
strategy:
matrix:
arch: [amd64]
rust: [nightly-2021-07-04]
rust: []
container:
image: ${{ matrix.arch }}/rust
env:
Expand Down Expand Up @@ -174,7 +174,7 @@ jobs:
strategy:
matrix:
os: [windows-latest, macos-latest]
rust: [stable]
rust: [nightly-2021-07-04]
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -202,7 +202,7 @@ jobs:
strategy:
matrix:
arch: [amd64]
rust: [stable]
rust: [nightly-2021-07-04]
container:
image: ${{ matrix.arch }}/rust
env:
Expand Down Expand Up @@ -257,7 +257,7 @@ jobs:
strategy:
matrix:
arch: [amd64]
rust: [stable]
rust: [nightly-2021-07-04]
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -341,7 +341,7 @@ jobs:
strategy:
matrix:
arch: [amd64]
rust: [stable]
rust: [nightly-2021-07-04]
container:
image: ${{ matrix.arch }}/rust
env:
Expand Down
60 changes: 40 additions & 20 deletions arrow/src/compute/kernels/comparison.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,18 +262,28 @@ fn like_utf8_impl<OffsetSize: StringOffsetSizeTrait>(
regex
} else {
let mut prev_char = None;
let mut re_pattern = pat.replace(|c| {
let res = c == '%' && prev_char != Some('\\');
prev_char = Some(c);
res
}, ".*").replace("\\%", "%");
let mut re_pattern = pat
.replace(
|c| {
let res = c == '%' && prev_char != Some('\\');
prev_char = Some(c);
res
},
".*",
)
.replace("\\%", "%");

let mut prev_char = None;
re_pattern = re_pattern.replace(|c| {
let res = c == '_' && prev_char != Some('\\');
prev_char = Some(c);
res
}, ".").replace("\\_", "_");
re_pattern = re_pattern
.replace(
|c| {
let res = c == '_' && prev_char != Some('\\');
prev_char = Some(c);
res
},
".",
)
.replace("\\_", "_");
let re = RegexBuilder::new(&format!("^{}$", re_pattern))
.case_insensitive(!case_sensitive)
.build()
Expand Down Expand Up @@ -383,18 +393,28 @@ fn like_utf8_scalar_impl<OffsetSize: StringOffsetSizeTrait>(
}
} else {
let mut prev_char = None;
let mut re_pattern = right.replace(|c| {
let res = c == '%' && prev_char != Some('\\');
prev_char = Some(c);
res
}, ".*").replace("\\%", "%");
let mut re_pattern = right
.replace(
|c| {
let res = c == '%' && prev_char != Some('\\');
prev_char = Some(c);
res
},
".*",
)
.replace("\\%", "%");

let mut prev_char = None;
re_pattern = re_pattern.replace(|c| {
let res = c == '_' && prev_char != Some('\\');
prev_char = Some(c);
res
}, ".").replace("\\_", "_");
re_pattern = re_pattern
.replace(
|c| {
let res = c == '_' && prev_char != Some('\\');
prev_char = Some(c);
res
},
".",
)
.replace("\\_", "_");
let re = RegexBuilder::new(&format!("^{}$", re_pattern))
.case_insensitive(!case_sensitive)
.build()
Expand Down
8 changes: 8 additions & 0 deletions parquet/src/file/serialized_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,14 @@ impl<R: 'static + ChunkReader> SerializedFileReader<R> {
})
}

/// Creates file reader from a Parquet file, using pre-read metadata.
pub fn new_with_metadata(chunk_reader: R, metadata: ParquetMetaData) -> Self {
Self {
chunk_reader: Arc::new(chunk_reader),
metadata,
}
}

/// Filters row group metadata to only those row groups,
/// for which the predicate function returns true
pub fn filter_row_groups(
Expand Down