Sigma-Ma opened a new pull request, #185: URL: https://github.com/apache/hbase-connectors/pull/185
JIRA: https://issues.apache.org/jira/browse/HBASE-30585 ## What changes were proposed in this pull request? Validate the encoded byte length of each fixed-length composite row key component before creating a `Put` in Spark 3 and Spark 4. The error reports the column name and the expected and actual byte lengths. ## Why are the changes needed? With the first component fixed at two bytes, `("ab", "c")` and `("a", "bc")` both encoded to `abc`. The second write could overwrite the first row. ## How was this patch tested? The new tests confirm that invalid writes are rejected, the original value is preserved, and lengths are measured in UTF-8 bytes. ```bash spark3_suite=org.apache.hadoop.hbase.spark.DefaultSourceSuite spark4_suite=org.apache.hadoop.hbase.spark.datasources.HBaseTableProviderSuite mvn -B -ntp -pl spark/hbase-spark -Dsuites=org.apache.hadoop.hbase.spark.DefaultSourceSuite -Dtest=org.apache.hadoop.hbase.spark.DefaultSourceSuite -Dsurefire.failIfNoSpecifiedTests=false test mvn -B -ntp -Pspark4 -pl spark4/hbase-spark4 -Dsuites=org.apache.hadoop.hbase.spark.datasources.HBaseTableProviderSuite -Dtest=org.apache.hadoop.hbase.spark.datasources.HBaseTableProviderSuite -Dsurefire.failIfNoSpecifiedTests=false test ``` -- 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]
