ajantha-bhat commented on a change in pull request #3194: [CARBONDATA-3363] SDK supports read carbon data by given file lists, file or folder
URL:
https://github.com/apache/carbondata/pull/3194#discussion_r284090390
##########
File path: store/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonReaderBuilder.java
##########
@@ -70,6 +72,53 @@
ThreadLocalSessionInfo.setCarbonSessionInfo(new CarbonSessionInfo());
}
+ /**
+ * Construct a CarbonReaderBuilder with table name
+ *
+ * @param tableName table name
+ */
+ CarbonReaderBuilder(String tableName) {
+ this.tableName = tableName;
+ ThreadLocalSessionInfo.setCarbonSessionInfo(new CarbonSessionInfo());
+ }
+
+ /**
+ * set carbonData file folder
+ *
+ * @param tablePath table path
+ * @return CarbonReaderBuilder object
+ */
+ public CarbonReaderBuilder withFolder(String tablePath) {
+ this.tablePath = tablePath;
+ return this;
+ }
+
+ /**
+ * set carbondata file lists
+ *
+ * @param fileLists carbondata file lists
+ * @return CarbonReaderBuilder object
+ */
+ public CarbonReaderBuilder withFileLists(List fileLists) {
+ if (null == this.fileLists) {
Review comment:
If API is called by two times with same input, it will add duplicate entries, other API are not like that.
Better to take the latest value ?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[hidden email]
With regards,
Apache Git Services