wchevreuil commented on code in PR #172:
URL: https://github.com/apache/hbase-connectors/pull/172#discussion_r4458296510


##########
spark/hbase-spark/src/main/scala/org/apache/hadoop/hbase/spark/datasources/HBaseTableScanRDD.scala:
##########
@@ -48,7 +48,8 @@ class HBaseTableScanRDD(
     } else {
       None
     }
-    val upper = if (r.upperBound != null && r.upperBound.length > 0) {
+    // Only null is unbounded; an empty upper key must not turn an empty range 
into a full scan.
+    val upper = if (r.upperBound != null) {

Review Comment:
   Right, this is true that applying such a `key < '' ` filter throws an error, 
due to the fallBack check on HBaseRelation.buildScan that ends up creating a 
wrong Scan with the key added as column filter by spark's BaseRelation. 
   
   I was checking this with Claude, which suggested to change this logic on 
HBaseRelation.buildScan, however, I don't think such query filter `key < ''` 
really makes any sense, and an error is an acceptable result for me.



-- 
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