nastra opened a new issue, #14879:
URL: https://github.com/apache/iceberg/issues/14879

   ### Feature Request / Improvement
   
   This test is currently disabled because it currently fails with the 
following error
   ```
   org.apache.iceberg.exceptions.BadRequestException: Malformed request: 
Invalid value for conversion to type binary: 11 (java.lang.String)
        at 
org.apache.iceberg.rest.ErrorHandlers$DefaultErrorHandler.accept(ErrorHandlers.java:284)
        at 
org.apache.iceberg.rest.ErrorHandlers$TableErrorHandler.accept(ErrorHandlers.java:134)
        at 
org.apache.iceberg.rest.ErrorHandlers$TableErrorHandler.accept(ErrorHandlers.java:118)
        at org.apache.iceberg.rest.HTTPClient.throwFailure(HTTPClient.java:241)
        at org.apache.iceberg.rest.HTTPClient.execute(HTTPClient.java:336)
        at org.apache.iceberg.rest.BaseHTTPClient.post(BaseHTTPClient.java:137)
        at 
org.apache.iceberg.rest.RESTTableScan.planTableScan(RESTTableScan.java:144)
        at 
org.apache.iceberg.rest.RESTTableScan.planFiles(RESTTableScan.java:139)
        at 
org.apache.iceberg.BatchScanAdapter.planFiles(BatchScanAdapter.java:124)
        at 
org.apache.iceberg.spark.source.SparkPartitioningAwareScan.tasks(SparkPartitioningAwareScan.java:174)
        at 
org.apache.iceberg.spark.source.SparkPartitioningAwareScan.taskGroups(SparkPartitioningAwareScan.java:202)
        at 
org.apache.iceberg.spark.source.SparkPartitioningAwareScan.outputPartitioning(SparkPartitioningAwareScan.java:104)
        at 
org.apache.spark.sql.execution.datasources.v2.V2ScanPartitioningAndOrdering$$anonfun$partitioning$1.applyOrElse(V2ScanPartitioningAndOrdering.scala:45)
        at 
org.apache.spark.sql.execution.datasources.v2.V2ScanPartitioningAndOrdering$$anonfun$partitioning$1.applyOrElse(V2ScanPartitioningAndOrdering.scala:43)
   ```
   
   This is because we don't have a `schema` when reaching 
https://github.com/apache/iceberg/blob/d19e3ff07653167d902865281601a5da4e2f2def/core/src/main/java/org/apache/iceberg/expressions/ExpressionParser.java#L328
 and therefore can't successfully deserialize this type of expression.
   
   One approach would be to pass the `schema` through the `ParserContext` in 
https://github.com/apache/iceberg/blob/0cc337ace306033dff1db2775a8046c1a58214f5/core/src/main/java/org/apache/iceberg/rest/RESTTableScan.java#L83-L87
 but the issue is that when the `PlanTableScanRequest` is deserialized on the 
server, we deserialize the expression filter in 
https://github.com/apache/iceberg/blob/452221817882335fc1afd98ac6f302a269cb08a3/core/src/main/java/org/apache/iceberg/rest/requests/PlanTableScanRequestParser.java#L114-L116
 where we don't have the `ParserContext` injected yet, as it's being injected 
one step later in 
https://github.com/apache/iceberg/blob/f631298fd43c7425dc08f23c5b85a91d8c373aa2/core/src/main/java/org/apache/iceberg/rest/HTTPClient.java#L348
   
   ### Query engine
   
   Spark
   
   ### Willingness to contribute
   
   - [ ] I can contribute this improvement/feature independently
   - [ ] I would be willing to contribute this improvement/feature with 
guidance from the Iceberg community
   - [ ] I cannot contribute this improvement/feature at this time


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to