Skip to content

Commit

Permalink
[VL]Daily Update Velox Version (20231206)
Browse files Browse the repository at this point in the history
  • Loading branch information
yma11 committed Dec 7, 2023
1 parent 06b9d47 commit 8c5dd23
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions cpp/velox/compute/WholeStageResultIterator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ std::unordered_map<std::string, std::string> WholeStageResultIterator::getQueryC
configs[velox::core::QueryConfig::kSparkBloomFilterMaxNumBits] =
getConfigValue(confMap_, kBloomFilterMaxNumBits, "4194304");

configs[velox::core::QueryConfig::kArrowBridgeTimestampUnit] = 2;
configs[velox::core::QueryConfig::kArrowBridgeTimestampUnit] = "6";

} catch (const std::invalid_argument& err) {
std::string errDetails = err.what();
Expand Down Expand Up @@ -414,7 +414,7 @@ std::shared_ptr<velox::Config> WholeStageResultIterator::createConnectorConfig()
// The semantics of reading as lower case is opposite with case-sensitive.
configs[velox::connector::hive::HiveConfig::kFileColumnNamesReadAsLowerCase] =
getConfigValue(confMap_, kCaseSensitive, "false") == "false" ? "true" : "false";
configs[velox::connector::hive::HiveConfig::kArrowBridgeTimestampUnit] = 2;
configs[velox::connector::hive::HiveConfig::kArrowBridgeTimestampUnit] = "6";

return std::make_shared<velox::core::MemConfig>(configs);
}
Expand Down
4 changes: 2 additions & 2 deletions cpp/velox/memory/VeloxColumnarBatch.cc
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ void VeloxColumnarBatch::ensureFlattened() {
std::shared_ptr<ArrowSchema> VeloxColumnarBatch::exportArrowSchema() {
auto out = std::make_shared<ArrowSchema>();
ensureFlattened();
velox::exportToArrow(flattened_, ArrowUtils::getBridgeOptions(), *out);
velox::exportToArrow(flattened_, *out, ArrowUtils::getBridgeOptions());
return out;
}

std::shared_ptr<ArrowArray> VeloxColumnarBatch::exportArrowArray() {
auto out = std::make_shared<ArrowArray>();
ensureFlattened();
velox::exportToArrow(flattened_, ArrowUtils::getBridgeOptions(), *out, flattened_->pool());
velox::exportToArrow(flattened_, *out, flattened_->pool(), ArrowUtils::getBridgeOptions());
return out;
}

Expand Down
2 changes: 1 addition & 1 deletion cpp/velox/tests/VeloxColumnarBatchSerializerTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ TEST_F(VeloxColumnarBatchSerializerTest, serialize) {
auto buffer = serializer->serializeColumnarBatches({batch});

ArrowSchema cSchema;
exportToArrow(vector, ArrowUtils::getBridgeOptions(), cSchema);
exportToArrow(vector, cSchema, ArrowUtils::getBridgeOptions());
auto deserializer = std::make_shared<VeloxColumnarBatchSerializer>(arrowPool_.get(), veloxPool_, &cSchema);
auto deserialized = deserializer->deserialize(const_cast<uint8_t*>(buffer->data()), buffer->size());
auto deserializedVector = std::dynamic_pointer_cast<VeloxColumnarBatch>(deserialized)->getRowVector();
Expand Down
2 changes: 1 addition & 1 deletion cpp/velox/utils/VeloxArrowUtils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace gluten {
using namespace facebook;

void toArrowSchema(const velox::TypePtr& rowType, facebook::velox::memory::MemoryPool* pool, struct ArrowSchema* out) {
exportToArrow(velox::BaseVector::create(rowType, 0, pool), ArrowUtils::getBridgeOptions(), *out);
exportToArrow(velox::BaseVector::create(rowType, 0, pool), *out, ArrowUtils::getBridgeOptions());
}

std::shared_ptr<arrow::Schema> toArrowSchema(const velox::TypePtr& rowType, facebook::velox::memory::MemoryPool* pool) {
Expand Down
6 changes: 3 additions & 3 deletions cpp/velox/utils/VeloxArrowUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ namespace gluten {

class ArrowUtils {
public:
static facebook::velox::BridgeOptions getBridgeOptions() {
facebook::velox::BridgeOptions options;
options.timestampUnit = static_cast<facebook::velox::TimestampUnit>(2);
static ArrowOptions getBridgeOptions() {
ArrowOptions options;
options.timestampUnit = static_cast<TimestampUnit>(6);
return options;
}
};
Expand Down

0 comments on commit 8c5dd23

Please sign in to comment.