Skip to content

Commit a2b663d

Browse files
committed
fix(native): Generation of thrift protocol
The thrift generation was broken because a line that was expected to be removed was not and caused a thrift parse error. That line is "drift.recursive_reference = true,” which was not caught by the regex attempting to remove it. This PR also adds the required thrift parser to the python installation of the dependency to use it in the CI.
1 parent e024bd8 commit a2b663d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

presto-native-execution/presto_cpp/main/thrift/thrift2json.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def preprocess(file_path, output_temp_path):
3838
lines = file.readlines()
3939
modified_lines = []
4040
for line in lines:
41-
modified_line = re.sub(r"\s*,*\s*drift\.recursive_reference=true\s*", "", line)
41+
modified_line = re.sub(r"\s*,*\s*drift\.recursive_reference\s*=\s*true\s*,*\s*", "", line)
4242
modified_line = re.sub(r"\(\s*\)$", "", modified_line)
4343
modified_lines.append(modified_line)
4444
with open(output_temp_path, "w") as file:

presto-native-execution/scripts/setup-centos.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export NPROC=${NPROC:-$(getconf _NPROCESSORS_ONLN)}
3333
function install_presto_deps_from_package_managers {
3434
dnf install -y maven java clang-tools-extra jq perl-XML-XPath
3535
# This python version is installed by the Velox setup scripts
36-
pip install regex pyyaml chevron black
36+
pip install regex pyyaml chevron black ptsd-jbroll
3737
}
3838

3939
function install_gperf {

0 commit comments

Comments
 (0)