Github user ravipesala commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2786#discussion_r221260295
--- Diff:
integration/spark2/src/main/scala/org/apache/spark/sql/CarbonDatasourceHadoopRelation.scala
---
@@ -80,6 +82,20 @@ case class CarbonDatasourceHadoopRelation(
val projection = new CarbonProjection
+ if (carbonTable.isChildDataMap) {
+ val parentTableIdentifier =
carbonTable.getTableInfo.getParentRelationIdentifiers.get(0)
+ val path =
CarbonEnv.getCarbonTable(Some(parentTableIdentifier.getDatabaseName),
+ parentTableIdentifier.getTableName)(sparkSession).getTablePath
+ for (carbonDimension: CarbonDimension <-
carbonTable.getAllDimensions.asScala) {
+
carbonDimension.getColumnSchema.getParentColumnTableRelations.get(0)
+ .getRelationIdentifier.setTablePath(path)
+ }
+ for (carbonDimension: CarbonDimension <-
carbonTable.getDimensions.asScala) {
+
carbonDimension.getColumnSchema.getParentColumnTableRelations.get(0)
+ .getRelationIdentifier.setTablePath(path)
--- End diff --
Is the `RelationIdentifier` is different objects in all dimensions? Isn't
it a single object used in all dimensions.?
---