Skip to content

Commit

Permalink
Pipe: Optimize the process of collecting PipeTsFileInsertionEvent in …
Browse files Browse the repository at this point in the history
…table model to reduce unnecessary parsing of TsFile (#14697)

Co-authored-by: Steve Yurong Su <rong@apache.org>
  • Loading branch information
luoluoyuyu and SteveYurongSu authored Jan 14, 2025
1 parent f129298 commit 701a515
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -120,7 +120,8 @@ private void parseAndCollectEvent(final PipeTsFileInsertionEvent sourceEvent) th
if (!forceTabletFormat
&& (!sourceEvent.shouldParseTimeOrPattern()
|| (sourceEvent.isTableModelEvent()
&& sourceEvent.getTablePattern() == null
&& (sourceEvent.getTablePattern() == null
|| !sourceEvent.getTablePattern().hasTablePattern())
&& !sourceEvent.shouldParseTime()))) {
collectEvent(sourceEvent);
return;
Original file line number Diff line number Diff line change
@@ -95,6 +95,10 @@ public String getTablePattern() {
return tablePattern == null ? EXTRACTOR_TABLE_NAME_DEFAULT_VALUE : tablePattern.pattern();
}

public boolean hasTablePattern() {
return tablePattern != null;
}

/**
* Interpret from source parameters and get a pipe pattern.
*

0 comments on commit 701a515

Please sign in to comment.