Skip to content

Commit

Permalink
[ISSUE-4305] Optimize the usage of static method (#4309)
Browse files Browse the repository at this point in the history
static method shouldn't be called by object, it should be call by class
  • Loading branch information
xubo245 authored Apr 24, 2023
1 parent b941983 commit 2439589
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Binary file added .DS_Store
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -325,12 +325,12 @@ private CarbonFileInputFormat prepareFileInputFormat(Job job, boolean enableBloc
table.getTableInfo().getFactTable().setTableProperties(tableProperties);
}
final CarbonFileInputFormat format = new CarbonFileInputFormat();
format.setTableInfo(job.getConfiguration(), table.getTableInfo());
format.setTablePath(job.getConfiguration(), table.getTablePath());
format.setTableName(job.getConfiguration(), table.getTableName());
format.setDatabaseName(job.getConfiguration(), table.getDatabaseName());
CarbonFileInputFormat.setTableInfo(job.getConfiguration(), table.getTableInfo());
CarbonFileInputFormat.setTablePath(job.getConfiguration(), table.getTablePath());
CarbonFileInputFormat.setTableName(job.getConfiguration(), table.getTableName());
CarbonFileInputFormat.setDatabaseName(job.getConfiguration(), table.getDatabaseName());
if (filterExpression != null) {
format.setFilterPredicates(job.getConfiguration(),
CarbonFileInputFormat.setFilterPredicates(job.getConfiguration(),
new IndexFilter(table, filterExpression, true));
}
if (null != this.fileLists) {
Expand All @@ -345,7 +345,7 @@ private CarbonFileInputFormat prepareFileInputFormat(Job job, boolean enableBloc
"Complex child columns projection NOT supported through CarbonReader");
}
}
format.setColumnProjection(job.getConfiguration(), projectionColumns);
CarbonFileInputFormat.setColumnProjection(job.getConfiguration(), projectionColumns);
}
if ((disableLoadBlockIndex) && (filterExpression == null)) {
job.getConfiguration().set("filter_blocks", "false");
Expand Down

0 comments on commit 2439589

Please sign in to comment.