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 6, 2023
1 parent 06b9d47 commit 24e0e82
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 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
4 changes: 2 additions & 2 deletions ep/build-velox/src/get_velox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

set -exu

VELOX_REPO=https://github.com/oap-project/velox.git
VELOX_BRANCH=update
VELOX_REPO=https://github.com/yma11/velox.git
VELOX_BRANCH=12-6
VELOX_HOME=""

#Set on run gluten on HDFS
Expand Down

0 comments on commit 24e0e82

Please sign in to comment.