You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2019/11/14 18:36:25 UTC

[GitHub] [incubator-pinot] jihaozh commented on a change in pull request #4826: [TE] Enable local debugging of CSV data

jihaozh commented on a change in pull request #4826: [TE] Enable local debugging of CSV data
URL: https://github.com/apache/incubator-pinot/pull/4826#discussion_r346479315
 
 

 ##########
 File path: thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/datasource/sql/SqlResponseCacheLoader.java
 ##########
 @@ -209,22 +213,32 @@ public SqlResponseCacheLoader(Map<String, Object> properties) throws Exception {
               File file = new File(fileURI);
               try (Scanner scanner = new Scanner(file)) {
                 String columnNames = scanner.nextLine();
-                while (scanner.hasNextLine()) {
-                  String line = scanner.nextLine();
-                  String[] items = line.split(",");
-                  DateTime dateTime = DateTime.parse(items[0], fmt);
-                  if (dateTime.isAfter(maxDateTime)) {
-                    maxDateTime = dateTime;
+
+                // For demo datasets, we want to show some sample plots for recent time period.
+                // We do this by sliding the historical static data stored in [daily|hourly].csv
+                // to the current timestamp.
+                if (isDemoDataset(tableName)) {
 
 Review comment:
   Shall we put this logic into `MockThirdEyeDataSource` and use that instead? That one is built for demo purposes. Feels like a hack to put it in the `SqlResponseCacheLoader`

----------------------------------------------------------------
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

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org