You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lens.apache.org by GitBox <gi...@apache.org> on 2019/07/19 07:02:26 UTC

[GitHub] [lens] Amareshwari commented on a change in pull request #34: [LENS-1545]: Fixed a Bug and made changes for PreparedQuery.

Amareshwari commented on a change in pull request #34: [LENS-1545]: Fixed a Bug and made changes for PreparedQuery.
URL: https://github.com/apache/lens/pull/34#discussion_r305224564
 
 

 ##########
 File path: lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeMetastoreClient.java
 ##########
 @@ -1830,30 +1830,19 @@ public XFact getXFactTable(FactTable ft) throws LensException {
         for (UpdatePeriod updatePeriod : updatePeriods) {
           tableNames.add(updatePeriodToTableMap.get(updatePeriod));
         }
-        if (tableNames.size() <= 1) {
-          XStorageTableElement tblElement = JAXBUtils.getXStorageTableFromHiveTable(
-            getHiveTable(MetastoreUtil.getFactOrDimtableStorageTableName(cft.getName(), storageName)));
-          tblElement.setStorageName(storageName);
-          for (UpdatePeriod p : updatePeriods) {
-            tblElement.getUpdatePeriods().getUpdatePeriod().add(XUpdatePeriod.valueOf(p.name()));
-          }
-          factTable.getStorageTables().getStorageTable().add(tblElement);
-        } else {
-          // Multiple storage tables.
-          XStorageTableElement tblElement = new XStorageTableElement();
-          tblElement.setStorageName(storageName);
-          XUpdatePeriods xUpdatePeriods = new XUpdatePeriods();
-          tblElement.setUpdatePeriods(xUpdatePeriods);
-          for (Map.Entry entry : updatePeriodToTableMap.entrySet()) {
-            XUpdatePeriodTableDescriptor updatePeriodTableDescriptor = new XUpdatePeriodTableDescriptor();
-            updatePeriodTableDescriptor.setTableDesc(getStorageTableDescFromHiveTable(
+        XStorageTableElement tblElement = new XStorageTableElement();
 
 Review comment:
   Can a unit test be added for the bug fixed here?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services