Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,15 @@ public PhysicalPlan parseSQLToPhysicalPlan(String sqlStr)

public PhysicalPlan parseSQLToPhysicalPlan(String sqlStr, ZoneId zoneId)
throws QueryProcessorException, ArgsErrorException, ProcessorException {
System.out.println("parseSQLToAST");
AstNode astNode = parseSQLToAST(sqlStr);
System.out.println("parseASTToOperator");
Operator operator = parseASTToOperator(astNode, zoneId);
System.out.println("logicalOptimize");
operator = logicalOptimize(operator, executor);
System.out.println("transformToPhysicalPlan");
PhysicalGenerator physicalGenerator = new PhysicalGenerator(executor);
System.out.println("transformToPhysicalPlan");
return physicalGenerator.transformToPhysicalPlan(operator);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ public class DatetimeUtilsTest {
public void setUp() throws Exception {
zoneOffset = ZonedDateTime.now().getOffset();
zoneId = ZoneId.systemDefault();
delta = (8 - Long.parseLong(zoneOffset.toString().split(":")[0])) * 3600000;
System.out.println(zoneOffset.toString());
if(zoneOffset.toString().equals("Z")){
delta = 8 * 3600000;
} else {
delta = (8 - Long.parseLong(zoneOffset.toString().split(":")[0])) * 3600000;
}
}

@After
Expand Down