FangYongs commented on code in PR #22832:
URL: https://github.com/apache/flink/pull/22832#discussion_r1316868536
##########
flink-table/flink-sql-gateway/src/main/java/org/apache/flink/table/gateway/rest/serde/ResultInfo.java:
##########
@@ -64,12 +67,21 @@ public class ResultInfo {
this.rowFormat = rowFormat;
}
- public static ResultInfo createResultInfo(ResultSet resultSet, RowFormat
rowFormat) {
+ public static ResultInfo createResultInfo(
+ ResultSet resultSet,
+ RowFormat rowFormat,
+ @Nullable RowDataLocalTimeZoneConverter timeZoneConverter) {
Preconditions.checkArgument(resultSet.getResultType() !=
ResultSet.ResultType.NOT_READY);
List<RowData> data = resultSet.getData();
switch (rowFormat) {
case JSON:
+ if (timeZoneConverter != null &&
timeZoneConverter.hasTimeZoneData()) {
Review Comment:
Currently there are only tow formats: `PAIN_TEXT` and `JSON`. There will be
zone id in `RowDataToStringConverterImpl` and the converter will use
`CastExecutor` with the zone id to convert time to string, so it's no need to
do it for format `PAIN_TEXT`.
--
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]