[GitHub] carbondata pull request #2400: [HOTFIX] Removed BatchedDataSourceScanExec cl...

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

[GitHub] carbondata pull request #2400: [HOTFIX] Removed BatchedDataSourceScanExec cl...

qiuchenjian-2
GitHub user ravipesala opened a pull request:

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

    [HOTFIX] Removed BatchedDataSourceScanExec class and extended directly from FileSourceScanExec

    Problem:
    Since some of the code of BatchedDataSourceScanExec is copied from spark, it is difficult to maintain from version upgrades of spark. Currently we face issues during spark 2.3 upgrade so better remove it.
   
    Solution:
    Remove BatchedDataSourceScanExec and extend directly the spark class FileSourceScanExec.
   
    Be sure to do all of the following checklist to help us incorporate
    your contribution quickly and easily:
   
     - [ ] Any interfaces changed?
     
     - [ ] Any backward compatibility impacted?
     
     - [ ] Document update required?
   
     - [ ] Testing done
            Please provide details on
            - Whether new unit test cases have been added or why no new tests are required?
            - How it is tested? Please attach test report.
            - Is it a performance related change? Please attach the performance test report.
            - Any additional information to help reviewers in testing this change.
           
     - [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.
   


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ravipesala/incubator-carbondata remove-batch-scan

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/carbondata/pull/2400.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2400
   
----
commit 48dcaa2dec8eb914ef99be21dd3657feb1028368
Author: ravipesala <ravi.pesala@...>
Date:   2018-06-22T12:43:59Z

    Removed BatchedDataSourceScanExec class and extended directly from FileSourceScanExec

----


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

[GitHub] carbondata issue #2400: [HOTFIX] Removed BatchedDataSourceScanExec class and...

qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2400
 
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/5308/



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

[GitHub] carbondata issue #2400: [HOTFIX] Removed BatchedDataSourceScanExec class and...

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

    https://github.com/apache/carbondata/pull/2400
 
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/6478/



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

[GitHub] carbondata issue #2400: [HOTFIX] Removed BatchedDataSourceScanExec class and...

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

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



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

[GitHub] carbondata issue #2400: [HOTFIX] Removed BatchedDataSourceScanExec class and...

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

    https://github.com/apache/carbondata/pull/2400
 
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/5346/



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

[GitHub] carbondata issue #2400: [HOTFIX] Removed BatchedDataSourceScanExec class and...

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

    https://github.com/apache/carbondata/pull/2400
 
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/6514/



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

[GitHub] carbondata issue #2400: [HOTFIX] Removed BatchedDataSourceScanExec class and...

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

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



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

[GitHub] carbondata issue #2400: [HOTFIX] Removed BatchedDataSourceScanExec class and...

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

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



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

[GitHub] carbondata issue #2400: [HOTFIX] Removed BatchedDataSourceScanExec class and...

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

    https://github.com/apache/carbondata/pull/2400
 
    Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/5357/



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

[GitHub] carbondata issue #2400: [HOTFIX] Removed BatchedDataSourceScanExec class and...

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

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



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

[GitHub] carbondata pull request #2400: [HOTFIX] Removed BatchedDataSourceScanExec cl...

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/2400#discussion_r199315241
 
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/strategy/CarbonLateDecodeStrategy.scala ---
    @@ -673,4 +673,26 @@ private[sql] class CarbonLateDecodeStrategy extends SparkStrategy {
         supportCodegen && vectorizedReader.toBoolean &&
         cols.forall(_.dataType.isInstanceOf[AtomicType])
       }
    +
    +  private def createHadoopFSRelation(relation: LogicalRelation) = {
    +    val sparkSession = relation.relation.sqlContext.sparkSession
    +    relation.catalogTable match {
    +      case Some(catalogTable) =>
    +        HadoopFsRelation(new CatalogFileIndex(
    --- End diff --
   
    move `new CatalogFileIndex(` to next line


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

[GitHub] carbondata pull request #2400: [HOTFIX] Removed BatchedDataSourceScanExec cl...

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/2400#discussion_r199315246
 
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/strategy/CarbonLateDecodeStrategy.scala ---
    @@ -673,4 +673,26 @@ private[sql] class CarbonLateDecodeStrategy extends SparkStrategy {
         supportCodegen && vectorizedReader.toBoolean &&
         cols.forall(_.dataType.isInstanceOf[AtomicType])
       }
    +
    +  private def createHadoopFSRelation(relation: LogicalRelation) = {
    +    val sparkSession = relation.relation.sqlContext.sparkSession
    +    relation.catalogTable match {
    +      case Some(catalogTable) =>
    +        HadoopFsRelation(new CatalogFileIndex(
    +          sparkSession,
    +          catalogTable, relation.relation.sizeInBytes),
    +          catalogTable.partitionSchema,
    +          catalogTable.schema,
    +          catalogTable.bucketSpec,
    +          new SparkCarbonTableFormat,
    +          catalogTable.storage.properties)(sparkSession)
    +      case _ =>
    +        HadoopFsRelation(new InMemoryFileIndex(sparkSession, Seq.empty, Map.empty, None),
    --- End diff --
   
    move `new InMemoryFileIndex(sparkSession, Seq.empty, Map.empty, None)` to next line


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

[GitHub] carbondata pull request #2400: [HOTFIX] Removed BatchedDataSourceScanExec cl...

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/2400#discussion_r199315264
 
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/strategy/CarbonLateDecodeStrategy.scala ---
    @@ -673,4 +673,26 @@ private[sql] class CarbonLateDecodeStrategy extends SparkStrategy {
         supportCodegen && vectorizedReader.toBoolean &&
         cols.forall(_.dataType.isInstanceOf[AtomicType])
       }
    +
    +  private def createHadoopFSRelation(relation: LogicalRelation) = {
    +    val sparkSession = relation.relation.sqlContext.sparkSession
    +    relation.catalogTable match {
    +      case Some(catalogTable) =>
    +        HadoopFsRelation(new CatalogFileIndex(
    --- End diff --
   
    If parameter list is long, it is better to add the parameter name also for better readability.


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

[GitHub] carbondata pull request #2400: [HOTFIX] Removed BatchedDataSourceScanExec cl...

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/2400#discussion_r199315290
 
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/strategy/CarbonDataSourceScan.scala ---
    @@ -0,0 +1,52 @@
    +/*
    + * 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.spark.sql.execution.strategy
    +
    +import org.apache.spark.rdd.RDD
    +import org.apache.spark.sql.catalyst.{InternalRow, TableIdentifier}
    +import org.apache.spark.sql.catalyst.expressions.{Attribute, SortOrder}
    +import org.apache.spark.sql.catalyst.plans.physical.Partitioning
    +import org.apache.spark.sql.execution.FileSourceScanExec
    +import org.apache.spark.sql.execution.datasources.{HadoopFsRelation, LogicalRelation}
    +
    +/**
    + *  Physical plan node for scanning data.
    --- End diff --
   
    Please describe whether both `STORED AS CARBONDATA` `USING` will use this physical plan?


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

[GitHub] carbondata pull request #2400: [HOTFIX] Removed BatchedDataSourceScanExec cl...

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

    https://github.com/apache/carbondata/pull/2400#discussion_r202421814
 
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/strategy/CarbonLateDecodeStrategy.scala ---
    @@ -673,4 +673,26 @@ private[sql] class CarbonLateDecodeStrategy extends SparkStrategy {
         supportCodegen && vectorizedReader.toBoolean &&
         cols.forall(_.dataType.isInstanceOf[AtomicType])
       }
    +
    +  private def createHadoopFSRelation(relation: LogicalRelation) = {
    +    val sparkSession = relation.relation.sqlContext.sparkSession
    +    relation.catalogTable match {
    +      case Some(catalogTable) =>
    +        HadoopFsRelation(new CatalogFileIndex(
    --- End diff --
   
    Ok, moved down.


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

[GitHub] carbondata pull request #2400: [HOTFIX] Removed BatchedDataSourceScanExec cl...

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

    https://github.com/apache/carbondata/pull/2400#discussion_r202422351
 
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/strategy/CarbonLateDecodeStrategy.scala ---
    @@ -673,4 +673,26 @@ private[sql] class CarbonLateDecodeStrategy extends SparkStrategy {
         supportCodegen && vectorizedReader.toBoolean &&
         cols.forall(_.dataType.isInstanceOf[AtomicType])
       }
    +
    +  private def createHadoopFSRelation(relation: LogicalRelation) = {
    +    val sparkSession = relation.relation.sqlContext.sparkSession
    +    relation.catalogTable match {
    +      case Some(catalogTable) =>
    +        HadoopFsRelation(new CatalogFileIndex(
    +          sparkSession,
    +          catalogTable, relation.relation.sizeInBytes),
    +          catalogTable.partitionSchema,
    +          catalogTable.schema,
    +          catalogTable.bucketSpec,
    +          new SparkCarbonTableFormat,
    +          catalogTable.storage.properties)(sparkSession)
    +      case _ =>
    +        HadoopFsRelation(new InMemoryFileIndex(sparkSession, Seq.empty, Map.empty, None),
    --- End diff --
   
    ok


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

[GitHub] carbondata pull request #2400: [HOTFIX] Removed BatchedDataSourceScanExec cl...

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

    https://github.com/apache/carbondata/pull/2400#discussion_r202423226
 
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/strategy/CarbonDataSourceScan.scala ---
    @@ -0,0 +1,52 @@
    +/*
    + * 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.spark.sql.execution.strategy
    +
    +import org.apache.spark.rdd.RDD
    +import org.apache.spark.sql.catalyst.{InternalRow, TableIdentifier}
    +import org.apache.spark.sql.catalyst.expressions.{Attribute, SortOrder}
    +import org.apache.spark.sql.catalyst.plans.physical.Partitioning
    +import org.apache.spark.sql.execution.FileSourceScanExec
    +import org.apache.spark.sql.execution.datasources.{HadoopFsRelation, LogicalRelation}
    +
    +/**
    + *  Physical plan node for scanning data.
    --- End diff --
   
    At present we don't have the separate reader for `USING`


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

[GitHub] carbondata pull request #2400: [HOTFIX] Removed BatchedDataSourceScanExec cl...

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

    https://github.com/apache/carbondata/pull/2400#discussion_r202423922
 
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/strategy/CarbonDataSourceScan.scala ---
    @@ -0,0 +1,52 @@
    +/*
    + * 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.spark.sql.execution.strategy
    +
    +import org.apache.spark.rdd.RDD
    +import org.apache.spark.sql.catalyst.{InternalRow, TableIdentifier}
    +import org.apache.spark.sql.catalyst.expressions.{Attribute, SortOrder}
    +import org.apache.spark.sql.catalyst.plans.physical.Partitioning
    +import org.apache.spark.sql.execution.FileSourceScanExec
    +import org.apache.spark.sql.execution.datasources.{HadoopFsRelation, LogicalRelation}
    +
    +/**
    + *  Physical plan node for scanning data.
    --- End diff --
   
    added


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

[GitHub] carbondata issue #2400: [HOTFIX] Removed BatchedDataSourceScanExec class and...

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

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



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

[GitHub] carbondata issue #2400: [HOTFIX] Removed BatchedDataSourceScanExec class and...

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

    https://github.com/apache/carbondata/pull/2400
 
    Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/5883/



---
12