Fix C++ client reading FLOAT inference columns declared as DOUBLE#17759
Open
hongzhi-gao wants to merge 3 commits into
Open
Fix C++ client reading FLOAT inference columns declared as DOUBLE#17759hongzhi-gao wants to merge 3 commits into
hongzhi-gao wants to merge 3 commits into
Conversation
CALL INFERENCE returns FLOAT data in TsBlock while the result schema declares DOUBLE. Coerce by actual column type in getDouble/getFloat to avoid Unsupported operation: getDouble when iterating RowRecord.
Avoid a separate test source file; keep the same coverage in session_tests.
Align with Java TsFile: IntColumn/FloatColumn/LongColumn support cross-type getters (e.g. FloatColumn::getDouble). IoTDBRpcDataSet delegates directly to column getters like the Java client. Fixes CALL INFERENCE crash when schema declares DOUBLE but TsBlock stores FLOAT (including RLE-encoded columns).
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.
Summary
Fixes C++ client crash on
CALL INFERENCEwhen reading results viaRowRecord(e.g.toString()).Inference result schema declares
outputas DOUBLE, but AINode writes FLOAT values in TsBlock (e.g. chronos2float32, often RLE-encoded). C++FloatColumndid not implementgetDouble(), causing:Fix
Implement numeric widening getters on
Columnsubclasses, aligned with Java TsFile:IntColumngetLong,getFloat,getDoubleFloatColumngetDoubleLongColumngetDoubleRunLengthEncodedColumndelegates to the inner column, so RLE-wrapped FLOAT inference output works automatically.IoTDBRpcDataSetnow callscolumn->getDouble()/getFloat()directly, same as the Java client.Test plan
session_tests "[column]"— Float, RLE Float, Int, Long widening getters