This is an automated email from the ASF dual-hosted git repository.
chenliang613 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/carbondata.git
The following commit(s) were added to refs/heads/master by this push:
new 243958990d [ISSUE-4305] Optimize the usage of static method (#4309)
243958990d is described below
commit 243958990dbbf398423ce3e0adc93a1c8f8e56a3
Author: Bo Xu <[email protected]>
AuthorDate: Tue Apr 25 03:03:01 2023 +0800
[ISSUE-4305] Optimize the usage of static method (#4309)
static method shouldn't be called by object, it should be call by class
---
.DS_Store | Bin 0 -> 6148 bytes
.../apache/carbondata/sdk/file/CarbonReaderBuilder.java | 12 ++++++------
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/.DS_Store b/.DS_Store
new file mode 100644
index 0000000000..f1282cea4f
Binary files /dev/null and b/.DS_Store differ
diff --git
a/sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonReaderBuilder.java
b/sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonReaderBuilder.java
index c7464050ac..6f4922a26b 100644
---
a/sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonReaderBuilder.java
+++
b/sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonReaderBuilder.java
@@ -325,12 +325,12 @@ public class CarbonReaderBuilder {
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) {
@@ -345,7 +345,7 @@ public class CarbonReaderBuilder {
"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");