You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lens.apache.org by pr...@apache.org on 2017/06/14 09:37:18 UTC

lens git commit: LENS-1433: Virtual Fact over a fact with single storage - multi update period is writing wrong query

Repository: lens
Updated Branches:
  refs/heads/master 949974d60 -> 191756ade


LENS-1433: Virtual Fact over a fact with single storage - multi update period is writing wrong query


Project: http://git-wip-us.apache.org/repos/asf/lens/repo
Commit: http://git-wip-us.apache.org/repos/asf/lens/commit/191756ad
Tree: http://git-wip-us.apache.org/repos/asf/lens/tree/191756ad
Diff: http://git-wip-us.apache.org/repos/asf/lens/diff/191756ad

Branch: refs/heads/master
Commit: 191756adec2ebe0147cdd7a3bff8e7f6584e7354
Parents: 949974d
Author: Rajitha R <ra...@gmail.com>
Authored: Wed Jun 14 15:06:56 2017 +0530
Committer: Rajat Khandelwal <ra...@gmail.com>
Committed: Wed Jun 14 15:06:56 2017 +0530

----------------------------------------------------------------------
 .../java/org/apache/lens/cube/parse/StorageCandidate.java    | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lens/blob/191756ad/lens-cube/src/main/java/org/apache/lens/cube/parse/StorageCandidate.java
----------------------------------------------------------------------
diff --git a/lens-cube/src/main/java/org/apache/lens/cube/parse/StorageCandidate.java b/lens-cube/src/main/java/org/apache/lens/cube/parse/StorageCandidate.java
index c8ff3b8..6e5aa4c 100644
--- a/lens-cube/src/main/java/org/apache/lens/cube/parse/StorageCandidate.java
+++ b/lens-cube/src/main/java/org/apache/lens/cube/parse/StorageCandidate.java
@@ -265,7 +265,7 @@ public class StorageCandidate implements Candidate, CandidateTable {
       Set<String> uniqueStorageTables = new HashSet<>();
       for (UpdatePeriod updatePeriod : validUpdatePeriods) {
         uniqueStorageTables.add(
-          getCubeMetastoreClient().getStorageTableName(fact.getName(), storageName, updatePeriod)
+          getCubeMetastoreClient().getStorageTableName(fact.getSourceFactName(), storageName, updatePeriod)
         );
       }
       return uniqueStorageTables;
@@ -891,7 +891,7 @@ public class StorageCandidate implements Candidate, CandidateTable {
       return this.startTime;
     }
     return getCubeMetastoreClient().getStorageTableStartDate(
-      getCubeMetastoreClient().getStorageTableName(fact.getName(), storageName, interval), fact.getName());
+      getCubeMetastoreClient().getStorageTableName(fact.getSourceFactName(), storageName, interval), fact.getName());
   }
 
   private Date getStorageTableEndDate(UpdatePeriod interval) throws LensException {
@@ -900,7 +900,7 @@ public class StorageCandidate implements Candidate, CandidateTable {
       return this.endTime;
     }
     return getCubeMetastoreClient().getStorageTableEndDate(
-      getCubeMetastoreClient().getStorageTableName(fact.getName(), storageName, interval), fact.getName());
+      getCubeMetastoreClient().getStorageTableName(fact.getSourceFactName(), storageName, interval), fact.getName());
   }
 
 
@@ -931,7 +931,7 @@ public class StorageCandidate implements Candidate, CandidateTable {
       StorageCandidate updatePeriodSpecificSc;
       for (UpdatePeriod period : participatingUpdatePeriods) {
         updatePeriodSpecificSc = copy();
-        updatePeriodSpecificSc.setResolvedName(getCubeMetastoreClient().getStorageTableName(fact.getName(),
+        updatePeriodSpecificSc.setResolvedName(getCubeMetastoreClient().getStorageTableName(fact.getSourceFactName(),
           storageName, period));
         updatePeriodSpecificSc.truncatePartitions(period);
         periodSpecificScList.add(updatePeriodSpecificSc);