Github user kaspersorensen commented on a diff in the pull request:

    https://github.com/apache/metamodel/pull/58#discussion_r42322079
  
    --- Diff: 
jdbc/src/main/java/org/apache/metamodel/jdbc/dialects/DefaultQueryRewriter.java 
---
    @@ -139,13 +143,24 @@ public String rewriteFilterItem(FilterItem item) {
                         }
                     }
     
    -                FilterItem replacementFilterItem = new 
FilterItem(item.getSelectItem(), item.getOperator(), elements);
    +                FilterItem replacementFilterItem = new 
FilterItem(selectItem, item.getOperator(), elements);
                     return super.rewriteFilterItem(replacementFilterItem);
                 }
             }
             return super.rewriteFilterItem(item);
         }
    -    
    +
    +    protected String rewriteTimestamp(FilterItem item) {
    --- End diff --
    
    Now this method does a rewrite of a whole filter item and not just the 
timestamp literal. I was suggesting to make something that would make the 
burden of overriding as little as possible, so that you would only need to do 
like this:
    
    ```
    protected String rewriteTimestamp(Timestamp timestamp) {
      return MyStrangeTimestampFormat.format(timestamp);
    } 
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to