Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Piotr Findeisen <[email protected]>
  • Loading branch information
adriangb and findepi committed Nov 1, 2024
1 parent e3f3171 commit d0aee77
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions datafusion/core/src/physical_optimizer/pruning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1713,13 +1713,9 @@ fn increment_utf8(data: &str) -> Option<String> {
fn is_valid_unicode(c: char) -> bool {
let cp = c as u32;

// Filter out Unicode surrogate pairs range
if (0xD800..=0xDFFF).contains(&cp) {
return false;
}

// Filter out non-characters
if (0xFDD0..=0xFDEF).contains(&cp) {
// Filter out non-characters (https://www.unicode.org/versions/corrigendum9.html)
if [0xFFFE, 0xFFFF].contains(&cp) || (0xFDD0..=0xFDEF).contains(&cp) {
return false;
}

Expand Down

0 comments on commit d0aee77

Please sign in to comment.