corleyma commented on code in PR #8134: URL: https://github.com/apache/iceberg/pull/8134#discussion_r1272605880
########## python/pyiceberg/avro/decoder_fast.pyx: ########## @@ -0,0 +1,246 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +import cython +from cython.cimports.cpython import array +from datetime import datetime, time +from uuid import UUID +from pyiceberg.avro.lazydict import LazyDictIntInt +from pyiceberg.avro import STRUCT_DOUBLE, STRUCT_FLOAT +from pyiceberg.utils.datetime import micros_to_time, micros_to_timestamp, micros_to_timestamptz +from pyiceberg.utils.decimal import unscaled_to_decimal +from pyiceberg.io import InputStream +from cpython.mem cimport PyMem_Malloc, PyMem_Realloc, PyMem_Free +from libc.string cimport memcpy +import decimal + +import array + +cdef extern from "decoder_basic.c": + void decode_ints_with_ptr(const char **buffer, unsigned int count, unsigned long *result); + void skip_int(const char **buffer); + +unsigned_long_array_template = cython.declare(array.array, array.array('L', [])) + [email protected] +cdef class CythonBinaryDecoder: Review Comment: presumably at a minimum this will also just play nicer with existing python static analysis tooling. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
