Sigma-Ma opened a new pull request, #181:
URL: https://github.com/apache/hbase-connectors/pull/181

   ## What changes were proposed in this pull request?
   
   Keep top-level column pruning in the Spark 4 connector and use the full 
catalog field definition for each requested column. Spark can then project 
nested fields from the complete Avro struct returned by the reader.
   
   Add two MiniCluster regression tests that collect a non-leading string field 
and a non-leading integer field with Spark nested schema pruning enabled.
   
   ## Why are the changes needed?
   
   The scan could report a pruned Avro struct while the reader returned the 
full struct in catalog order. Spark uses the reported schema to resolve field 
positions. Selecting a non-leading field could therefore return the first 
field's value or throw a `ClassCastException` if the types differed.
   
   ## How was this patch tested?
   
   ```bash
   mvn -B -ntp -nsu -Pspark4 -pl spark4/hbase-spark4 -Dtest=NoJavaTests 
-Dsurefire.failIfNoSpecifiedTests=false 
-Dsuites=org.apache.hadoop.hbase.spark.datasources.HBaseTableProviderSuite,org.apache.hadoop.hbase.spark.datasources.HBaseScanBuilderSuite
 -Dsurefire.rerunFailingTestsCount=0 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]

Reply via email to