hive
hive copied to clipboard
HIVE-29362: New configuration to display EXPLAIN FORMATTED in human-readable format
What changes were proposed in this pull request?
- Add new property to control indentation of EXPLAIN FORMATTED result
- Create the appropriate JsonParser in ExplainTask based on explain configurations
- Drop now unused and redundant JsonParserFactory
- Extract logic for augmenting RS outputs in separate method dedicated for this purpose
Why are the changes needed?
- Improve readability of EXPLAIN FORMATTED result in qtest
- Avoid unnecessary masking in q.out files
- Speed-up processing of files by QOutProcessor (shorter lines -> more efficient pattern matching)
- Better git utilization (history, log, blame, merge, rebase, etc.)
Does this PR introduce any user-facing change?
No, unless they change the value of hive.explain.formatted.indent property.
How was this patch tested?
mvn test -Dtest=TestMiniLlapLocalCliDriver -Dqfile=plan_json.q,excluded_rule_explain.q,materialized_view_rebuild_2.q,ctas.q,input4.q,join0.q,vector_outer_join5.q,vector_outer_join4.q,materialized_view_create.q,explain_ast.q,explain_locks.q,cte_cbo_plan_json.q,authorization_explain.q,concat_op.q,vector_outer_join3.q,tez_union.q,parallel_join0.q,vector_outer_join6.q,explain_dependency.q,explain_dependency2.q,explaindenpendencydiffengs.q
mvn test -Dtest=TestIcebergCliDriver -Dqfile=iceberg_explain_formatted.q
@soumyakanti3578 You are absolutely right that there should be a test case using set hive.explain.formatted.indent=false. I added one in https://github.com/apache/hive/pull/6230/commits/73e95d17ce3e97a582e35d3339dd4e46a27bc0e6
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code