Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rui-mo committed Sep 15, 2023
1 parent 4b3a800 commit 90e08b1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions velox/type/Subfield.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,13 @@ enum SubfieldKind {
kLongSubscript
};

// Contains field name separators to use in Tokenizer.
// Contains field name separators to be used in Tokenizer.
struct Separators {
static const std::shared_ptr<const Separators>& default() {
static const std::shared_ptr<const Separators> instance{new Separators()};
return instance;
}

bool isSeparator(char c) const {
return (
c == closeBracket || c == dot || c == openBracket || c == quote ||
Expand Down Expand Up @@ -213,8 +218,7 @@ class Subfield {
// Separators: the customized separators to tokenize field name.
explicit Subfield(
const std::string& path,
const std::shared_ptr<Separators>& separators =
std::make_shared<Separators>());
const std::shared_ptr<Separators>& separators = Separators::default());

explicit Subfield(std::vector<std::unique_ptr<PathElement>>&& path);

Expand Down

0 comments on commit 90e08b1

Please sign in to comment.