You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "liugddx (via GitHub)" <gi...@apache.org> on 2024/07/29 11:11:04 UTC
[PR] [Fix] fix arrow read timestamp bug [doris-spark-connector]
liugddx opened a new pull request, #221:
URL: https://github.com/apache/doris-spark-connector/pull/221
# Proposed changes
Issue Number: close #xxx
Currently, when reading arrow, since the be layer hard-codes all datetimev2 scales to 6, arrow returns TimeStampMicroVector, which results in scale parsing errors when arrow is displayed. Refer to https://github.com/apache/doris/issues/38174
https://github.com/apache/doris-flink-connector/pull/446
## Problem Summary:
Describe the overview of changes.
## Checklist(Required)
1. Does it affect the original behavior: (Yes/No/I Don't know)
2. Has unit tests been added: (Yes/No/No Need)
3. Has document been added or modified: (Yes/No/No Need)
4. Does it need to update dependencies: (Yes/No)
5. Are there any changes that cannot be rolled back: (Yes/No)
## Further comments
If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [Fix] fix arrow read timestamp bug [doris-spark-connector]
Posted by "JNSimba (via GitHub)" <gi...@apache.org>.
JNSimba merged PR #221:
URL: https://github.com/apache/doris-spark-connector/pull/221
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [Fix] fix arrow read timestamp bug [doris-spark-connector]
Posted by "liugddx (via GitHub)" <gi...@apache.org>.
liugddx commented on code in PR #221:
URL: https://github.com/apache/doris-spark-connector/pull/221#discussion_r1696166655
##########
spark-doris-connector/src/main/java/org/apache/doris/spark/serialization/RowBatch.java:
##########
@@ -369,28 +374,23 @@ public void convertArrowToRowBatch() throws DorisException {
continue;
}
String value = new String(varCharVector.get(rowIndex), StandardCharsets.UTF_8);
- addValueToRow(rowIndex, value);
+ value = completeMilliseconds(value);
+ LocalDateTime parse = LocalDateTime.parse(value, dateTimeV2Formatter);
Review Comment:
> Is there a problem with using dateTimeV2Formatter for datetime?
I tested it and referred to the flink connector.
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [Fix] fix arrow read timestamp bug [doris-spark-connector]
Posted by "JNSimba (via GitHub)" <gi...@apache.org>.
JNSimba commented on code in PR #221:
URL: https://github.com/apache/doris-spark-connector/pull/221#discussion_r1696163971
##########
spark-doris-connector/src/main/java/org/apache/doris/spark/serialization/RowBatch.java:
##########
@@ -369,28 +374,23 @@ public void convertArrowToRowBatch() throws DorisException {
continue;
}
String value = new String(varCharVector.get(rowIndex), StandardCharsets.UTF_8);
- addValueToRow(rowIndex, value);
+ value = completeMilliseconds(value);
+ LocalDateTime parse = LocalDateTime.parse(value, dateTimeV2Formatter);
Review Comment:
Is there a problem with using dateTimeV2Formatter for datetime?
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [Fix] fix arrow read timestamp bug [doris-spark-connector]
Posted by "liugddx (via GitHub)" <gi...@apache.org>.
liugddx commented on code in PR #221:
URL: https://github.com/apache/doris-spark-connector/pull/221#discussion_r1696166655
##########
spark-doris-connector/src/main/java/org/apache/doris/spark/serialization/RowBatch.java:
##########
@@ -369,28 +374,23 @@ public void convertArrowToRowBatch() throws DorisException {
continue;
}
String value = new String(varCharVector.get(rowIndex), StandardCharsets.UTF_8);
- addValueToRow(rowIndex, value);
+ value = completeMilliseconds(value);
+ LocalDateTime parse = LocalDateTime.parse(value, dateTimeV2Formatter);
Review Comment:
> Is there a problem with using dateTimeV2Formatter for datetime?
I tested it and referred to the flink connector. It works
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org