[ 
https://issues.apache.org/jira/browse/LENS-1545?focusedWorklogId=280376&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-280376
 ]

ASF GitHub Bot logged work on LENS-1545:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 22/Jul/19 12:51
            Start Date: 22/Jul/19 12:51
    Worklog Time Spent: 10m 
      Work Description: RajashekharChoukimath commented on pull request #34: 
[LENS-1545]: Fixed a Bug and made changes for PreparedQuery.
URL: https://github.com/apache/lens/pull/34#discussion_r305827383
 
 

 ##########
 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:
   added it.
 
----------------------------------------------------------------
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:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 280376)
    Time Spent: 2h 20m  (was: 2h 10m)

> Fixed a Bug and made changes for PreparedQuery
> ----------------------------------------------
>
>                 Key: LENS-1545
>                 URL: https://issues.apache.org/jira/browse/LENS-1545
>             Project: Apache Lens
>          Issue Type: Improvement
>          Components: api, cube, server
>            Reporter: Rajashekhar
>            Assignee: Amareshwari Sriramadasu
>            Priority: Major
>          Time Spent: 2h 20m
>  Remaining Estimate: 0h
>
> Fixed following Issues in Lens for Azure Migrations
>  # Bug in Lens-Metastore for single fact granularity -- 
> https://issues.apache.org/jira/browse/LENS-1544. Explaination: This had a 
> special case for handling facts with one-update-period and 
> multiple-update-periods. The case which handled one-update-period had a bug 
> while generating the name of the hive table whole format is 
> update_period-fact_name, the update_period was coming as null.
>  # JDBCDriver.java was invoking JDBC Driver while validating the prepared 
> query, I don't need this functionality so blocking this via already existing 
> config parameter JDBC_VALIDATE_THROUGH_PREPARE.
> 2a) Old Flow:
> {code}
> esitmate()
> --- | --> validate
> -----| --> JDBC_VALIDATE_THROUGH_PREPARE condition to prepare through if 
> condition
> -----|--> prepareInternal()
> ----------------|--> rewrite -- Rewritting take place
> {code}
> 2b) New Flow:
> {code}
> esitmate()
> ---| --> rewrite -- Rewritting take place
> ---| --> validate
> -----| --> JDBC_VALIDATE_THROUGH_PREPARE condition to prepare through if 
> condition
> -----|--> prepareInternal()
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to