Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb40132a

Browse files
committed
Improve filter_tokens in core tokenizer
1 parentd10cc06 commitb40132a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎uncoder-core/app/translator/core/tokenizer.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ def tokenize(self, query: str) -> list[QUERY_TOKEN_TYPE]:
338338
@staticmethod
339339
deffilter_tokens(
340340
tokens:list[QUERY_TOKEN_TYPE],
341-
token_type:Union[type[FieldValue],type[Field],type[Keyword],type[Identifier]],
341+
token_type:Union[type[FieldValue],type[Field],type[FieldField],type[Keyword],type[Identifier]],
342342
)->list[QUERY_TOKEN_TYPE]:
343343
return [tokenfortokenintokensifisinstance(token,token_type)]
344344

@@ -363,7 +363,9 @@ def get_field_tokens_from_func_args( # noqa: PLR0912
363363
result.extend(self.get_field_tokens_from_func_args(args=arg.args))
364364
result.extend(self.get_field_tokens_from_func_args(args=arg.by_clauses))
365365
result.extend(self.get_field_tokens_from_func_args(args=[arg.filter_]))
366-
elifisinstance(arg, (JoinFunction,UnionFunction)):
366+
elifisinstance(arg,JoinFunction):
367+
result.extend(self.get_field_tokens_from_func_args(args=arg.condition))
368+
elifisinstance(arg,UnionFunction):
367369
continue
368370
elifisinstance(arg,Function):
369371
result.extend(self.get_field_tokens_from_func_args(args=arg.args))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp