amansinha100 commented on a change in pull request #1610: DRILL-6969: Fix
inconsistency of reading MaprDB JSON tables using hive plugin when native
reader is enabled
URL: https://github.com/apache/drill/pull/1610#discussion_r247221659
##########
File path:
contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/json/CompareFunctionsProcessor.java
##########
@@ -69,21 +69,52 @@ public Boolean visitUnknown(LogicalExpression e,
LogicalExpression valueArg) thr
return false;
}
+ /**
+ * Converts specified function call to be pushed into maprDB JSON scan.
+ *
+ * @param call function call to be pushed
+ * @return CompareFunctionsProcessor instance which contains converted
function call
+ */
public static CompareFunctionsProcessor process(FunctionCall call) {
+ return processWithEvaluator(call, new
CompareFunctionsProcessor(call.getName()));
+ }
+
+ /**
+ * Converts specified function call to be pushed into maprDB JSON scan.
+ * For the case when timestamp value is used, it is converted to UTC timezone
+ * before converting to {@link OTimestamp} instance.
+ *
+ * @param call function call to be pushed
+ * @return CompareFunctionsProcessor instance which contains converted
function call
+ */
+ public static CompareFunctionsProcessor
processWithTimeZoneOffset(FunctionCall call) {
+ CompareFunctionsProcessor processor = new
CompareFunctionsProcessor(call.getName()) {
+ @Override
+ protected boolean visitTimestampExpr(SchemaPath path,
TimeStampExpression valueArg) {
+ // converts timestamp value from local time zone to UTC
Review comment:
You may want to add that '....UTC since the record reader reads the
timestamp in local timezone if the timezonewithoffset flag is enabled'
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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