villebro commented on a change in pull request #13163:
URL: https://github.com/apache/superset/pull/13163#discussion_r577445933



##########
File path: superset/db_engine_specs/pinot.py
##########
@@ -86,7 +86,9 @@ def get_timestamp_expr(
                 python_pattern,
                 java_pattern,
             ) in cls._python_to_java_time_patterns.items():
-                java_date_format.replace(python_pattern, java_pattern)
+                java_date_format = java_date_format.replace(
+                    python_pattern, java_pattern
+                )

Review comment:
       Line 84 won't work correctly for `pdf = None` (I assume `pdf` will 
always be defined, but it doesn't look right). Let's fix that now, too, 
something like
   ```python
               if pdf:
                   java_date_format = pdf
                   for (
                       python_pattern,
                       java_pattern,
                   ) in cls._python_to_java_time_patterns.items():
                       java_date_format = java_date_format.replace(
                           python_pattern, java_pattern
                       )
   ```
   




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



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

Reply via email to