Fix pipe receiver type conversion load path#17849
Open
Caideyipi wants to merge 4 commits into
Open
Conversation
jt2594838
approved these changes
Jun 5, 2026
Caideyipi
commented
Jun 5, 2026
Collaborator
Author
Caideyipi
left a comment
There was a problem hiding this comment.
I think this expected value is off because the source column is FLOAT, not DOUBLE. The literal 19700103.1 is stored as a 32-bit float before the receiver-side conversion, and it rounds to 19700104.0f. ValueConverter.convertFloatToDate then casts that float to int before parsing the date, so this row should convert to 1970-01-04, not 1970-01-03.
Could we update this expected value, or use a float value that is exactly representable enough for the intended 19700103 case?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fix Pipe receiver type conversion semantics for stream/default sink paths, especially table-model TsFile load.
The receiver can receive both realtime insert statements and flushed TsFiles from the default
iotdb-thrift-sink. Insert statements now try the type-conversion wrapper before normal execution, so partial insert does not write nulls before conversion. Sync/async load also forces schema verification whenconvert-on-type-mismatchis enabled.For table-model TsFile load, FIELD column type mismatch is now reported as
LoadAnalyzeTypeMismatchExceptionduring verification. This letsLoadTsFileAnalyzerfall back to existing tablet conversion instead of native-loading a mismatched table TsFile and bypassing conversion.The ITs cover the original semantic conversion matrix and the stream/default sink table scenario that previously reproduced null values after flush/load.
Tests
.\mvnw.cmd -pl iotdb-core/datanode "-Dtest=IoTDBDataNodeReceiverTest,LoadTsFileAnalyzerTest" test.\mvnw.cmd -pl iotdb-core/datanode -DskipTests "-Drat.skip=true" install.\mvnw.cmd -pl integration-test -P with-integration-tests -P MultiClusterIT2DualTableManualEnhanced -DskipUTs "-Dit.test=IoTDBPipeTypeConversionSemanticIT#testStreamPipeReceiverTypeConversionSemantics" "-DfailIfNoTests=false" "-Dfailsafe.failIfNoSpecifiedTests=false" "-Drat.skip=true" verify.\mvnw.cmd -pl integration-test -P with-integration-tests -P MultiClusterIT2DualTableManualEnhanced -DskipUTs "-Dit.test=IoTDBPipeTypeConversionSemanticIT#testPipeReceiverTypeConversionSemantics" "-DfailIfNoTests=false" "-Dfailsafe.failIfNoSpecifiedTests=false" "-Drat.skip=true" verify.\mvnw.cmd -pl integration-test -P with-integration-tests -P MultiClusterIT2DualTreeAutoEnhanced -DskipUTs "-Dit.test=IoTDBPipeTypeConversionSemanticIT#testAlignedStreamPipeReceiverTypeConversionSemantics" "-DfailIfNoTests=false" "-Dfailsafe.failIfNoSpecifiedTests=false" "-Drat.skip=true" verify