Posted by
GitBox on
Feb 01, 2021; 6:57am
URL: http://apache-carbondata-dev-mailing-list-archive.168.s1.nabble.com/GitHub-carbondata-Karan980-opened-a-new-pull-request-4083-CARBONDATA-4112-Data-mismatch-issue-in-SI-tp105749p105835.html
Indhumathi27 commented on a change in pull request #4083:
URL:
https://github.com/apache/carbondata/pull/4083#discussion_r567597957##########
File path: integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/rdd/SecondaryIndexCreator.scala
##########
@@ -580,34 +581,39 @@ object SecondaryIndexCreator {
sparkSession: SparkSession,
carbonTable: CarbonTable,
projections: String,
- segments: Array[String]): DataFrame = {
+ segments: Array[String],
+ isPositionReferenceRequired: Boolean = false): DataFrame = {
try {
CarbonThreadUtil.threadSet(
CarbonCommonConstants.CARBON_INPUT_SEGMENTS + carbonTable.getDatabaseName +
CarbonCommonConstants.POINT + carbonTable.getTableName, segments.mkString(","))
val logicalPlan = sparkSession.sql(
s"select $projections from ${ carbonTable.getDatabaseName }.${
carbonTable.getTableName}").queryExecution.logical
- val positionId = UnresolvedAlias(Alias(UnresolvedFunction("getPositionId",
- Seq.empty, isDistinct = false), CarbonCommonConstants.POSITION_ID)())
- val newLogicalPlan = logicalPlan.transform {
- case p: Project =>
- Project(p.projectList :+ positionId, p.child)
- }
- val tableProperties = if (carbonTable.isHivePartitionTable) {
- // in case of partition table, TableProperties object in carbonEnv is not same as
- // in carbonTable object, so update from carbon env itself.
- CarbonEnv.getCarbonTable(Some(carbonTable.getDatabaseName), carbonTable.getTableName)(
- sparkSession).getTableInfo
- .getFactTable
- .getTableProperties
+ if (isPositionReferenceRequired) {
Review comment:
please add comments about this check
----------------------------------------------------------------
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:
[hidden email]