[GitHub] carbondata pull request #1587: [CARBONDATA-1835] Fix null exception when get...
Github user asfgit closed the pull request at: https://github.com/apache/carbondata/pull/1587 ---
[GitHub] carbondata pull request #1587: [CARBONDATA-1835] Fix null exception when get...
Github user jackylk commented on a diff in the pull request: https://github.com/apache/carbondata/pull/1587#discussion_r153789066 --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/schema/CarbonGetTableDetailCommand.scala --- @@ -31,12 +31,12 @@ import org.apache.carbondata.core.util.CarbonProperties */ case class CarbonGetTableDetailCommand( databaseName: String, -tableNames: Seq[String]) +tableNames: Option[Seq[String]]) extends DataCommand { override def processData(sparkSession: SparkSession): Seq[Row] = { val storePath = CarbonProperties.getStorePath -tableNames.map { tablename => +tableNames.get.map { tablename => --- End diff -- use isDefined ---
[GitHub] carbondata pull request #1587: [CARBONDATA-1835] Fix null exception when get...
Github user jackylk commented on a diff in the pull request: https://github.com/apache/carbondata/pull/1587#discussion_r153722661 --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/schema/CarbonGetTableDetailCommand.scala --- @@ -42,18 +42,22 @@ case class CarbonGetTableDetailCommand( override def processData(sparkSession: SparkSession): Seq[Row] = { val storePath = CarbonProperties.getStorePath -tableNames.map { tablename => - val absoluteTableIdentifier = -AbsoluteTableIdentifier.from(storePath, databaseName.toLowerCase, tablename.toLowerCase) - val carbonTableIdentifier = absoluteTableIdentifier.getCarbonTableIdentifier - val carbonTable = CarbonEnv.getCarbonTable(Option(carbonTableIdentifier.getDatabaseName), -carbonTableIdentifier.getTableName)(sparkSession) +if (null != tableNames) { --- End diff -- suggest to change tableNames to type Option[Seq[String]] instead of using null ---
[GitHub] carbondata pull request #1587: [CARBONDATA-1835] Fix null exception when get...
GitHub user chenerlu opened a pull request: https://github.com/apache/carbondata/pull/1587 [CARBONDATA-1835] Fix null exception when get table detail Be sure to do all of the following checklist to help us incorporate your contribution quickly and easily: - [ ] Any interfaces changed? No - [ ] Any backward compatibility impacted? No - [ ] Document update required? No - [ ] 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/chenerlu/incubator-carbondata fixnep Alternatively you can review and apply these changes as the patch at: https://github.com/apache/carbondata/pull/1587.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 #1587 commit e37dea76036242008ce20938b4c21ba0027ab4a2 Author: chenerluDate: 2017-11-29T07:51:53Z [CARBONDATA-1835] Fix null exception when get table detail ---