code: def test_output_field_names(use_threads):
      in_table = pa.Table.from_pydict({"x": [1, 2, 3]})
  
      def table_provider(names, schema):
          return in_table
  
      substrait_query = """
      {
        "version": { "major": 9999 },
        "relations": [
          {
            "root": {
              "input": {
                "read": {
                  "base_schema": {
                    "struct": {
                      "types": [{"i64": {}}]
                    },
                    "names": ["x"]
                  },
                  "namedTable": {
                    "names": ["t1"]
                  }
                }
              },
              "names": ["out"]
            }
          }
        ]
      }
      """
  
      buf = pa._substrait._parse_json_plan(tobytes(substrait_query))
      reader = pa.substrait.run_query(
          buf, table_provider=table_provider, use_threads=use_threads
      )
      res_tb = reader.read_all()
  
      expected = pa.Table.from_pydict({"out": [1, 2, 3]})
  
      assert res_tb == expected
  
imports: import os
  import pathlib
  import pytest
  import pyarrow
  import pyarrow.compute
  from pyarrow.lib import tobytes
  from pyarrow.lib import ArrowInvalid, ArrowNotImplementedError
label_desc: Use image node_id 14 for calling a global function with example usage: test_output_field_names(use_threads) and returns: in_table