Skip to content

Conversation

@JackieTien97
Copy link
Contributor

This pull request introduces support for handling the OBJECT data type as a binary blob in both JDBC and session APIs, and adds integration tests to verify correct behavior. The main changes include updating how OBJECT columns are processed and retrieved, and providing comprehensive test coverage for object and blob queries.

JDBC and Session API Enhancements

  • Updated getBlob(int columnIndex) and getBlob(String columnLabel) in ClusterTestResultSet.java to support retrieving blob values from all underlying result sets and comparing them, instead of throwing UnsupportedOperationException. [1] [2]
  • Modified IoTDBJDBCResultSet.java so that both BLOB and OBJECT data types are returned as byte arrays, ensuring consistent binary handling for object columns.

Query Engine and Transformer Adjustments

  • Changed ColumnTransformerBuilder.java to treat the READ_OBJECT function as returning a BLOB type instead of OBJECT, aligning internal type handling for object columns with binary semantics. [1] [2]
  • Removed unused import for ObjectType.OBJECT in ColumnTransformerBuilder.java.

Integration Test Coverage

  • Added a new test class IoTDBObjectQueryIT.java to verify object and blob query behaviors via both JDBC and session APIs, including assertions for binary content, string representations, and correct query results.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@codecov
Copy link

codecov bot commented Nov 26, 2025

Codecov Report

❌ Patch coverage is 27.77778% with 26 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (force_ci/object_type@1b2d3ff). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...eceiver/visitor/PipeStatementExceptionVisitor.java 0.00% 5 Missing ⚠️
...mmons/pipe/receiver/PipeReceiverStatusHandler.java 69.23% 4 Missing ⚠️
...ipe/sink/protocol/IoTDBConfigRegionAirGapSink.java 0.00% 2 Missing ⚠️
...ager/pipe/sink/protocol/IoTDBConfigRegionSink.java 0.00% 2 Missing ⚠️
...receiver/visitor/PipeStatementTSStatusVisitor.java 0.00% 2 Missing ⚠️
...k/protocol/airgap/IoTDBSchemaRegionAirGapSink.java 0.00% 2 Missing ⚠️
...nk/protocol/thrift/sync/IoTDBSchemaRegionSink.java 0.00% 2 Missing ⚠️
...java/org/apache/iotdb/jdbc/IoTDBJDBCResultSet.java 0.00% 1 Missing ⚠️
...eceiver/protocol/thrift/IoTDBDataNodeReceiver.java 0.00% 1 Missing ⚠️
...ensus/handler/PipeConsensusDeleteEventHandler.java 0.00% 1 Missing ⚠️
... and 4 more
Additional details and impacted files
@@                   Coverage Diff                   @@
##             force_ci/object_type   #16821   +/-   ##
=======================================================
  Coverage                        ?   38.72%           
  Complexity                      ?      207           
=======================================================
  Files                           ?     5012           
  Lines                           ?   332913           
  Branches                        ?    42352           
=======================================================
  Hits                            ?   128934           
  Misses                          ?   203979           
  Partials                        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JackieTien97 JackieTien97 merged commit 32e1642 into force_ci/object_type Nov 27, 2025
34 of 35 checks passed
@JackieTien97 JackieTien97 deleted the ty/object_type branch November 27, 2025 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants