You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Chris (Jira)" <ji...@apache.org> on 2022/09/06 09:00:00 UTC

[jira] [Updated] (ARROW-17626) discrepancy of of schema and schema.metadata if second same-name key is byte-encoded

     [ https://issues.apache.org/jira/browse/ARROW-17626?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris updated ARROW-17626:
--------------------------
    Description: 
{code:python}
schema = pa.schema(
  [('col1', pa.int8())], 
  metadata={
    'key': 'key provided as string', 
    b'key': 'key provided as bytes'
  }
)
print(schema)
# col1: int8
# -- schema metadata --
# key: 'key provided as string'
# key: 'key provided as bytes'
print(schema.metadata)
# {b'key': b'key provided as string'}
{code}



  was:

{code:python}
schema = pa.schema(
  [('col1', pa.int8())], 
  metadata={
    'key': 'key provided as string', 
    b'key': 'key provided as bytes'
  }
)
print(schema)
# col1: int8
# -- schema metadata --
# key: 'key provided as string'
# key: 'key provided as bytes'
print(schema.metadata)
# {b'key': b'key provided as string'}
{code}



        Summary: discrepancy of of schema and schema.metadata if second same-name key is byte-encoded  (was: discrepancy of of schema and schema.metadata if second same-name key is ignored if the second key is byte-encoded)

> discrepancy of of schema and schema.metadata if second same-name key is byte-encoded
> ------------------------------------------------------------------------------------
>
>                 Key: ARROW-17626
>                 URL: https://issues.apache.org/jira/browse/ARROW-17626
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Python
>            Reporter: Chris
>            Priority: Minor
>              Labels: pyarrow
>         Attachments: pa_bug.py
>
>
> {code:python}
> schema = pa.schema(
>   [('col1', pa.int8())], 
>   metadata={
>     'key': 'key provided as string', 
>     b'key': 'key provided as bytes'
>   }
> )
> print(schema)
> # col1: int8
> # -- schema metadata --
> # key: 'key provided as string'
> # key: 'key provided as bytes'
> print(schema.metadata)
> # {b'key': b'key provided as string'}
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)