VenuReddy2103 commented on a change in pull request #4071:
URL: https://github.com/apache/carbondata/pull/4071#discussion_r566590213
##########
File path:
index/secondary-index/src/test/scala/org/apache/carbondata/spark/testsuite/mergedata/CarbonDataFileMergeTestCaseOnSI.scala
##########
@@ -288,20 +216,24 @@ class CarbonDataFileMergeTestCaseOnSI
CarbonCommonConstants.CARBON_SI_SEGMENT_MERGE_DEFAULT)
}
- test("test verify data file merge when exception occurred in rebuild
segment") {
- CarbonProperties.getInstance()
- .addProperty(CarbonCommonConstants.CARBON_SI_SEGMENT_MERGE, "false")
+ def createTableAndLoadData(globalSortPartition: String, loadTimes: Int):
Unit = {
sql("DROP TABLE IF EXISTS nonindexmerge")
sql(
"""
| CREATE TABLE nonindexmerge(id INT, name STRING, city STRING, age INT)
| STORED AS carbondata
| TBLPROPERTIES('SORT_COLUMNS'='city,name', 'SORT_SCOPE'='GLOBAL_SORT')
""".stripMargin)
- sql(s"LOAD DATA LOCAL INPATH '$file2' INTO TABLE nonindexmerge
OPTIONS('header'='false', " +
- s"'GLOBAL_SORT_PARTITIONS'='100')")
- sql(s"LOAD DATA LOCAL INPATH '$file2' INTO TABLE nonindexmerge
OPTIONS('header'='false', " +
- s"'GLOBAL_SORT_PARTITIONS'='100')")
+ for (_ <- 0 to loadTimes) {
Review comment:
loop runs for 0 to loadTimes(included) i.e., loadTimes + 1 times. You
would want to use `until loadTimes` instead of `to loadTimes`.
----------------------------------------------------------------
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:
[email protected]