clintropolis commented on a change in pull request #11643: URL: https://github.com/apache/druid/pull/11643#discussion_r701546354
########## File path: sql/src/main/java/org/apache/druid/sql/SqlRowTransformer.java ########## @@ -0,0 +1,81 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.druid.sql; + +import org.apache.calcite.rel.type.RelDataType; +import org.apache.calcite.sql.type.SqlTypeName; +import org.apache.druid.sql.calcite.planner.Calcites; +import org.joda.time.DateTimeZone; +import org.joda.time.format.ISODateTimeFormat; + +import javax.annotation.Nullable; +import java.util.ArrayList; +import java.util.List; + +/** + * This class transforms the values of TIMESTAMP or DATE type for sql query results. + * The transformation is required only when the sql query is submitted to {@link org.apache.druid.sql.http.SqlResource}. + */ +public class SqlRowTransformer Review comment: nice :+1: I wonder if someday we should consolidate the transformation that is done here, with the stuff [`QueryMaker` is doing](https://github.com/apache/druid/blob/master/sql/src/main/java/org/apache/druid/sql/calcite/rel/QueryMaker.java#L165), like maybe this transformer could be pushed all the way down, and maybe handle [the special stuff it is doing for JDBC there the same way with a transformer instead]( https://github.com/apache/druid/blob/master/sql/src/main/java/org/apache/druid/sql/calcite/rel/QueryMaker.java#L332) ########## File path: .idea/misc.xml ########## @@ -84,7 +84,7 @@ <resource url="http://maven.apache.org/ASSEMBLY/2.0.0" location="$PROJECT_DIR$/.idea/xml-schemas/assembly-2.0.0.xsd" /> <resource url="http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" location="$PROJECT_DIR$/.idea/xml-schemas/svg11.dtd" /> </component> - <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" project-jdk-name="1.8" project-jdk-type="JavaSDK"> + <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="azul-11" project-jdk-type="JavaSDK"> Review comment: unintended change? ########## File path: sql/src/main/java/org/apache/druid/sql/avatica/DruidStatement.java ########## @@ -216,7 +218,7 @@ public DruidStatement execute(List<TypedValue> parameters) sqlLifecycle.setParameters(parameters); sqlLifecycle.validateAndAuthorize(authenticationResult); sqlLifecycle.plan(); - final Sequence<Object[]> baseSequence = yielderOpenCloseExecutor.submit(sqlLifecycle::execute).get(); + Sequence<Object[]> baseSequence = yielderOpenCloseExecutor.submit(sqlLifecycle::execute).get(); Review comment: nit: why not final? -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
