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

 ##########
 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:
   That's a good idea. I will see how I can move it under the MockDataSource.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to