andygrove commented on code in PR #904:
URL: https://github.com/apache/datafusion-comet/pull/904#discussion_r1742523361
##########
common/src/main/scala/org/apache/comet/vector/NativeUtil.scala:
##########
@@ -30,12 +30,22 @@ import org.apache.spark.sql.vectorized.ColumnarBatch
import org.apache.comet.CometArrowAllocator
+/**
+ * Provides functionality for importing Arrow vectors from native code and
wrapping them as
+ * CometVectors.
+ *
+ * Also provides functionality for exporting Comet columnar batches to native
code.
+ *
+ * Each instance of NativeUtils creates an instance of CDataDictionaryProvider
(a
+ * DictionaryProvider that is used in C Data Interface for imports).
+ */
class NativeUtil {
import Utils._
+ /** Use the global allocator */
private val allocator = CometArrowAllocator
- private val dictionaryProvider: CDataDictionaryProvider = new
CDataDictionaryProvider
private val importer = new ArrowImporter(allocator)
+ private val dictionaryProvider: CDataDictionaryProvider = new
CDataDictionaryProvider
Review Comment:
It seemed to make sense to group the the `allocator` and `importer`
variables together since `importer` uses `allocator`. I am going to push
another commit to add some docs once this CI run has completed.
--
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]