Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-8904

[Python] Fix usages of deprecated C++ APIs related to child/field

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.0.0
    • Python

    Description

      -- Running cmake --build for pyarrow
      cmake --build . --config debug -- -j16
      [19/20] Building CXX object CMakeFiles/lib.dir/lib.cpp.o
      lib.cpp:20265:85: warning: 'num_children' is deprecated: Use num_fields() [-Wdeprecated-declarations]
        __pyx_t_1 = __pyx_f_7pyarrow_3lib__normalize_index(__pyx_v_i, __pyx_v_self->type->num_children()); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1L))) __PYX_ERR(1, 119, __pyx_L1_error)
                                                                                          ^
      /home/wesm/local/include/arrow/type.h:263:3: note: 'num_children' has been explicitly marked deprecated here
        ARROW_DEPRECATED("Use num_fields()")
        ^
      /home/wesm/local/include/arrow/util/macros.h:104:48: note: expanded from macro 'ARROW_DEPRECATED'
      #  define ARROW_DEPRECATED(...) __attribute__((deprecated(__VA_ARGS__)))
                                                     ^
      lib.cpp:20276:76: warning: 'child' is deprecated: Use field(i) [-Wdeprecated-declarations]
        __pyx_t_2 = __pyx_f_7pyarrow_3lib_pyarrow_wrap_field(__pyx_v_self->type->child(__pyx_v_index)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 120, __pyx_L1_error)
                                                                                 ^
      /home/wesm/local/include/arrow/type.h:251:3: note: 'child' has been explicitly marked deprecated here
        ARROW_DEPRECATED("Use field(i)")
        ^
      /home/wesm/local/include/arrow/util/macros.h:104:48: note: expanded from macro 'ARROW_DEPRECATED'
      #  define ARROW_DEPRECATED(...) __attribute__((deprecated(__VA_ARGS__)))
                                                     ^
      lib.cpp:20507:56: warning: 'num_children' is deprecated: Use num_fields() [-Wdeprecated-declarations]
        __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->type->num_children()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 139, __pyx_L1_error)
                                                             ^
      /home/wesm/local/include/arrow/type.h:263:3: note: 'num_children' has been explicitly marked deprecated here
        ARROW_DEPRECATED("Use num_fields()")
        ^
      /home/wesm/local/include/arrow/util/macros.h:104:48: note: expanded from macro 'ARROW_DEPRECATED'
      #  define ARROW_DEPRECATED(...) __attribute__((deprecated(__VA_ARGS__)))
                                                     ^
      lib.cpp:23361:44: warning: 'num_children' is deprecated: Use num_fields() [-Wdeprecated-declarations]
        __pyx_r = __pyx_v_self->__pyx_base.type->num_children();
                                                 ^
      /home/wesm/local/include/arrow/type.h:263:3: note: 'num_children' has been explicitly marked deprecated here
        ARROW_DEPRECATED("Use num_fields()")
        ^
      /home/wesm/local/include/arrow/util/macros.h:104:48: note: expanded from macro 'ARROW_DEPRECATED'
      #  define ARROW_DEPRECATED(...) __attribute__((deprecated(__VA_ARGS__)))
                                                     ^
      lib.cpp:24039:44: warning: 'num_children' is deprecated: Use num_fields() [-Wdeprecated-declarations]
        __pyx_r = __pyx_v_self->__pyx_base.type->num_children();
                                                 ^
      /home/wesm/local/include/arrow/type.h:263:3: note: 'num_children' has been explicitly marked deprecated here
        ARROW_DEPRECATED("Use num_fields()")
        ^
      /home/wesm/local/include/arrow/util/macros.h:104:48: note: expanded from macro 'ARROW_DEPRECATED'
      #  define ARROW_DEPRECATED(...) __attribute__((deprecated(__VA_ARGS__)))
                                                     ^
      lib.cpp:58220:37: warning: 'child' is deprecated: Use field(pos) [-Wdeprecated-declarations]
        __pyx_v_child = __pyx_v_self->ap->child(__pyx_v_child_id);
                                          ^
      /home/wesm/local/include/arrow/array.h:1281:3: note: 'child' has been explicitly marked deprecated here
        ARROW_DEPRECATED("Use field(pos)")
        ^
      /home/wesm/local/include/arrow/util/macros.h:104:48: note: expanded from macro 'ARROW_DEPRECATED'
      #  define ARROW_DEPRECATED(...) __attribute__((deprecated(__VA_ARGS__)))
                                                     ^
      lib.cpp:58956:74: warning: 'children' is deprecated: Use fields() [-Wdeprecated-declarations]
        __pyx_v_child_fields = __pyx_v_self->__pyx_base.__pyx_base.type->type->children();
                                                                               ^
      /home/wesm/local/include/arrow/type.h:257:3: note: 'children' has been explicitly marked deprecated here
        ARROW_DEPRECATED("Use fields()")
        ^
      /home/wesm/local/include/arrow/util/macros.h:104:48: note: expanded from macro 'ARROW_DEPRECATED'
      #  define ARROW_DEPRECATED(...) __attribute__((deprecated(__VA_ARGS__)))
                                                     ^
      lib.cpp:78247:73: warning: 'child' is deprecated: Use field(pos) [-Wdeprecated-declarations]
        __pyx_v_result = (( arrow::UnionArray *)__pyx_v_self->__pyx_base.ap)->child(__pyx_v_pos);
                                                                              ^
      /home/wesm/local/include/arrow/array.h:1281:3: note: 'child' has been explicitly marked deprecated here
        ARROW_DEPRECATED("Use field(pos)")
        ^
      /home/wesm/local/include/arrow/util/macros.h:104:48: note: expanded from macro 'ARROW_DEPRECATED'
      #  define ARROW_DEPRECATED(...) __attribute__((deprecated(__VA_ARGS__)))
                                                     ^
      8 warnings generated.
      
      

      Attachments

        Issue Links

          Activity

            People

              wesm Wes McKinney
              wesm Wes McKinney
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m