Github user kaspersorensen commented on a diff in the pull request:
https://github.com/apache/metamodel/pull/124#discussion_r74863473
--- Diff:
jdbc/src/main/java/org/apache/metamodel/jdbc/dialects/SQLServerQueryRewriter.java
---
@@ -116,6 +116,14 @@ public String rewriteFilterItem(FilterItem item) {
final String dateTimeValue = "CAST('" +
format.format(date) + "' AS DATETIME)";
sb.append(dateTimeValue);
+
+ //Remove TIMESTAMP token as SQL Server doesn't support it
+ int timestampIndex = sb.lastIndexOf("TIMESTAMP");
--- End diff --
Hmm where does this "TIMESTAMP" get added to `sb` in the first place?? I
think you may be fixing something that does not exist here?
(But I do think TIMESTAMP will be added by the default Query.toSql() and
.toString() methods ... This is just for display, not the actual SQL that will
be sent to the DB ... maybe you're confusing the two?)
---
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.
---