huaxingao commented on code in PR #38904:
URL: https://github.com/apache/spark/pull/38904#discussion_r1041841165
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/connector/catalog/InMemoryBaseTable.scala:
##########
@@ -294,7 +313,30 @@ abstract class InMemoryBaseTable(
val objectHeaderSizeInBytes = 12L
val rowSizeInBytes = objectHeaderSizeInBytes + schema.defaultSize
val sizeInBytes = numRows * rowSizeInBytes
- InMemoryStats(OptionalLong.of(sizeInBytes), OptionalLong.of(numRows))
+
+ val map = new util.HashMap[NamedReference, ColumnStatistics]()
+ val colNames = readSchema.fields.map(_.name)
+ for (col <- colNames) {
+ val fieldReference = FieldReference(col)
+ // put some fake data for testing only
+ val bin1 = InMemoryHistogramBin(1, 2, 5L)
+ val bin2 = InMemoryHistogramBin(3, 4, 5L)
+ val bin3 = InMemoryHistogramBin(5, 6, 5L)
+ val bin4 = InMemoryHistogramBin(7, 8, 5L)
+ val bin5 = InMemoryHistogramBin(9, 10, 5L)
Review Comment:
I removed the fake data and computed NDV and null Count for testing purpose.
--
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]