Skip to content

Commit c243388

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 a0c07bb commit c243388

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ 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(
42+
r"\s*,*\s*drift\.recursive_reference\s*=\s*true\s*,*\s*", "", line
43+
)
4244
modified_line = re.sub(r"\(\s*\)$", "", modified_line)
4345
modified_lines.append(modified_line)
4446
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)