一句话:提出基于深度栈自动机的模块化方法,在保持 SIMD 加速的同时为流式 JSONPath 增加 descendant 支持。
流式 JSON 查询中,现有 SIMD 加速方法能快速跳过大量无关文档片段,但不支持 descendant 轴,导致许多真实查询无法表达或需改写。本文研究支持 child、descendant、通配符和标签的 JSONPath 片段,提出基于深度栈自动机的模块化方案:由状态驱动分类器产生事件流,自动机处理事件,并在当前计算阶段快速跳过无关输入。作者用 Rust 实现并和当前最佳方法比较。实验表明,该方法能支持 descendant 且不牺牲性能,许多自然查询改用 descendant 表达后性能显著提升。
Harnessing the power of SIMD can bring tremendous performance gains in data processing. In querying streamed JSON data, the state of the art leverages SIMD to fast forward significant portions of the document. However, it does not provide support for descendant, which excludes many real-life queries and makes formulating many others hard. In this work, we aim to change this: we consider the fragment of JSONPath that supports child, descendant, wildcard, and labels. We propose a modular approach based on novel depth-stack automata that process a stream of events produced by a state-driven classifier, allowing fast forwarding parts of the input document irrelevant at the current stage of the computation. We implement our solution in Rust and compare it with the state of the art, confirming that our approach allows supporting descendants without sacrificing performance, and that reformulating natural queries using descendants brings impressive performance gains in many cases.