[GitHub] carbondata pull request #1404: [CARBONDATA-1541] There are some errors when ...

classic Classic list List threaded Threaded
35 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1404: [CARBONDATA-1541] There are some errors when bad_rec...

qiuchenjian-2
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/1404
 
    SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/1040/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1404: [CARBONDATA-1541] There are some errors when bad_rec...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user xubo245 commented on the issue:

    https://github.com/apache/carbondata/pull/1404
 
    Please review it @jackylk


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1404: [CARBONDATA-1541] There are some errors when ...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user jackylk commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1404#discussion_r143780104
 
    --- Diff: integration/spark-common-test/src/test/scala/org/apache/carbondata/integration/spark/testsuite/dataload/LoadDataWithBadRecords.scala ---
    @@ -0,0 +1,178 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.carbondata.integration.spark.testsuite.dataload
    +
    +import java.io.File
    +
    +import org.apache.carbondata.core.constants.CarbonCommonConstants
    +import org.apache.carbondata.core.util.CarbonProperties
    +import org.apache.spark.sql.Row
    +import org.apache.spark.sql.test.util.QueryTest
    +import org.scalatest.{BeforeAndAfterAll, BeforeAndAfterEach}
    +
    +class LoadDataWithBadRecordsTest extends QueryTest with BeforeAndAfterEach with BeforeAndAfterAll {
    +  override def beforeEach(): Unit = {
    +    sql("drop table if exists sales")
    +    sql("drop table if exists int_table")
    +    sql("drop table if exists boolean_table")
    +    sql(
    +      """CREATE TABLE IF NOT EXISTS sales(ID BigInt, date Timestamp, country String,
    +                  actual_price Double, Quantity int, sold_price Decimal(19,2)) STORED BY 'carbondata'""")
    +    sql("CREATE TABLE if not exists int_table(intField INT) STORED BY 'carbondata'")
    +    sql("CREATE TABLE if not exists boolean_table(booleanField INT) STORED BY 'carbondata'")
    +  }
    +
    +  override def beforeAll(): Unit = {
    +    CarbonProperties.getInstance()
    +      .addProperty(CarbonCommonConstants.CARBON_TIMESTAMP_FORMAT, "yyyy/MM/dd")
    +      .addProperty(CarbonCommonConstants.CARBON_DATE_FORMAT, "yyyy/MM/dd")
    +      .addProperty(CarbonCommonConstants.CARBON_BADRECORDS_LOC,
    +        new File("./target/test/badRecords")
    +          .getCanonicalPath)
    +  }
    +
    +  override def afterAll(): Unit = {
    +    sql("drop table if exists sales")
    +    sql("drop table if exists int_table")
    +    sql("drop table if exists boolean_table")
    +    CarbonProperties.getInstance()
    +      .addProperty(CarbonCommonConstants.CARBON_TIMESTAMP_FORMAT, CarbonCommonConstants.CARBON_TIMESTAMP_DEFAULT_FORMAT)
    +      .addProperty(CarbonCommonConstants.CARBON_DATE_FORMAT, CarbonCommonConstants.CARBON_DATE_DEFAULT_FORMAT)
    +      .addProperty(CarbonCommonConstants.CARBON_BADRECORDS_LOC, CarbonCommonConstants.CARBON_BADRECORDS_LOC_DEFAULT_VAL)
    +  }
    +
    +  val rootPath = new File(this.getClass.getResource("/").getPath
    +    + "../../../../").getCanonicalPath
    +
    +  val path = s"$rootPath/integration/spark-common-test/src/test/resources/badrecords/datasample.csv"
    +
    +  test("The bad_records_action: FORCE") {
    +    sql("LOAD DATA local inpath '" + path + "' INTO TABLE sales OPTIONS" +
    --- End diff --
   
    use
    ```
      s"""
      """
    ```
    instead of `+`


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1404: [CARBONDATA-1541] There are some errors when ...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user xubo245 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1404#discussion_r143897439
 
    --- Diff: integration/spark-common-test/src/test/scala/org/apache/carbondata/integration/spark/testsuite/dataload/LoadDataWithBadRecords.scala ---
    @@ -0,0 +1,178 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.carbondata.integration.spark.testsuite.dataload
    +
    +import java.io.File
    +
    +import org.apache.carbondata.core.constants.CarbonCommonConstants
    +import org.apache.carbondata.core.util.CarbonProperties
    +import org.apache.spark.sql.Row
    +import org.apache.spark.sql.test.util.QueryTest
    +import org.scalatest.{BeforeAndAfterAll, BeforeAndAfterEach}
    +
    +class LoadDataWithBadRecordsTest extends QueryTest with BeforeAndAfterEach with BeforeAndAfterAll {
    +  override def beforeEach(): Unit = {
    +    sql("drop table if exists sales")
    +    sql("drop table if exists int_table")
    +    sql("drop table if exists boolean_table")
    +    sql(
    +      """CREATE TABLE IF NOT EXISTS sales(ID BigInt, date Timestamp, country String,
    +                  actual_price Double, Quantity int, sold_price Decimal(19,2)) STORED BY 'carbondata'""")
    +    sql("CREATE TABLE if not exists int_table(intField INT) STORED BY 'carbondata'")
    +    sql("CREATE TABLE if not exists boolean_table(booleanField INT) STORED BY 'carbondata'")
    +  }
    +
    +  override def beforeAll(): Unit = {
    +    CarbonProperties.getInstance()
    +      .addProperty(CarbonCommonConstants.CARBON_TIMESTAMP_FORMAT, "yyyy/MM/dd")
    +      .addProperty(CarbonCommonConstants.CARBON_DATE_FORMAT, "yyyy/MM/dd")
    +      .addProperty(CarbonCommonConstants.CARBON_BADRECORDS_LOC,
    +        new File("./target/test/badRecords")
    +          .getCanonicalPath)
    +  }
    +
    +  override def afterAll(): Unit = {
    +    sql("drop table if exists sales")
    +    sql("drop table if exists int_table")
    +    sql("drop table if exists boolean_table")
    +    CarbonProperties.getInstance()
    +      .addProperty(CarbonCommonConstants.CARBON_TIMESTAMP_FORMAT, CarbonCommonConstants.CARBON_TIMESTAMP_DEFAULT_FORMAT)
    +      .addProperty(CarbonCommonConstants.CARBON_DATE_FORMAT, CarbonCommonConstants.CARBON_DATE_DEFAULT_FORMAT)
    +      .addProperty(CarbonCommonConstants.CARBON_BADRECORDS_LOC, CarbonCommonConstants.CARBON_BADRECORDS_LOC_DEFAULT_VAL)
    +  }
    +
    +  val rootPath = new File(this.getClass.getResource("/").getPath
    +    + "../../../../").getCanonicalPath
    +
    +  val path = s"$rootPath/integration/spark-common-test/src/test/resources/badrecords/datasample.csv"
    +
    +  test("The bad_records_action: FORCE") {
    +    sql("LOAD DATA local inpath '" + path + "' INTO TABLE sales OPTIONS" +
    --- End diff --
   
    Ok, I have changed it.


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1404: [CARBONDATA-1541] There are some errors when ...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user xubo245 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1404#discussion_r143897498
 
    --- Diff: integration/spark-common-test/src/test/scala/org/apache/carbondata/integration/spark/testsuite/dataload/LoadDataWithBadRecords.scala ---
    @@ -0,0 +1,180 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.carbondata.integration.spark.testsuite.dataload
    +
    +import java.io.File
    +
    +import org.apache.carbondata.core.constants.CarbonCommonConstants
    +import org.apache.carbondata.core.util.CarbonProperties
    +import org.apache.spark.sql.Row
    +import org.apache.spark.sql.test.util.QueryTest
    +import org.scalatest.{BeforeAndAfterAll, BeforeAndAfterEach}
    +
    +class LoadDataWithBadRecords extends QueryTest with BeforeAndAfterEach with BeforeAndAfterAll {
    --- End diff --
   
    Ok, I have add Test postfix to class name.


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1404: [CARBONDATA-1541] There are some errors when bad_rec...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1404
 
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/420/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1404: [CARBONDATA-1541] There are some errors when bad_rec...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1404
 
    Build Success with Spark 1.6, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/296/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1404: [CARBONDATA-1541] There are some errors when bad_rec...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/1404
 
    SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/1050/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1404: [CARBONDATA-1541] There are some errors when bad_rec...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user xubo245 commented on the issue:

    https://github.com/apache/carbondata/pull/1404
 
    @jackylk I have changed it and CI pass.


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1404: [CARBONDATA-1541] There are some errors when bad_rec...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user jackylk commented on the issue:

    https://github.com/apache/carbondata/pull/1404
 
    LGTM


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1404: [CARBONDATA-1541] There are some errors when ...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user jackylk commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1404#discussion_r144207692
 
    --- Diff: processing/src/main/java/org/apache/carbondata/processing/loading/DataLoadProcessBuilder.java ---
    @@ -56,7 +56,7 @@ public AbstractDataLoadProcessorStep build(CarbonLoadModel loadModel, String[] s
           CarbonIterator[] inputIterators) throws Exception {
         CarbonDataLoadConfiguration configuration = createConfiguration(loadModel, storeLocation);
         SortScopeOptions.SortScope sortScope = CarbonDataProcessorUtil.getSortScope(configuration);
    -    if (!configuration.isSortTable() || sortScope.equals(SortScopeOptions.SortScope.NO_SORT)) {
    +    if (sortScope.equals(SortScopeOptions.SortScope.NO_SORT)) {
    --- End diff --
   
    I do not think this is the correct place to modify. You should correct the place where bad record logger is called


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1404: [WIP][CARBONDATA-1541] There are some errors when ba...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/1404
 
    SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/1183/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1404: [WIP][CARBONDATA-1541] There are some errors when ba...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1404
 
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/552/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1404: [WIP][CARBONDATA-1541] There are some errors when ba...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1404
 
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/1417/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1404: [WIP][CARBONDATA-1541] There are some errors ...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user xubo245 closed the pull request at:

    https://github.com/apache/carbondata/pull/1404


---
12