[
https://issues.apache.org/jira/browse/PARQUET-2325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17743389#comment-17743389
]
ASF GitHub Bot commented on PARQUET-2325:
-----------------------------------------
sekikn opened a new pull request, #1122:
URL: https://github.com/apache/parquet-mr/pull/1122
Make sure you have checked _all_ steps below.
### Jira
- [x] My PR addresses the following [Parquet
Jira](https://issues.apache.org/jira/browse/PARQUET/) issues and references
them in the PR title. For example, "PARQUET-1234: My Parquet PR"
- https://issues.apache.org/jira/browse/PARQUET-2325
- In case you are adding a dependency, check if the license complies with
the [ASF 3rd Party License
Policy](https://www.apache.org/legal/resolved.html#category-x).
### Tests
- [x] My PR adds the following unit tests __OR__ does not need testing for
this extremely good reason:
o.a.parquet.cli.commands.ShowDictionaryCommandTest#testShowDirectoryCommandForFixedLengthByteArray
### Commits
- [x] My commits all reference Jira issues in their subject lines. In
addition, my commits follow the guidelines from "[How to write a good git
commit message](http://chris.beams.io/posts/git-commit/)":
1. Subject is separated from body by a blank line
1. Subject is limited to 50 characters (not including Jira issue reference)
1. Subject does not end with a period
1. Subject uses the imperative mood ("add", not "adding")
1. Body wraps at 72 characters
1. Body explains "what" and "why", not "how"
### Documentation
- [x] In case of new functionality, my PR adds documentation that describes
how to use it.
- All the public functions and the classes in the PR contain Javadoc that
explain what it does
> Fix parquet-cli's dictionary subcommand to work with FIXED_LEN_BYTE_ARRAY
> -------------------------------------------------------------------------
>
> Key: PARQUET-2325
> URL: https://issues.apache.org/jira/browse/PARQUET-2325
> Project: Parquet
> Issue Type: Bug
> Components: parquet-cli
> Reporter: Kengo Seki
> Assignee: Kengo Seki
> Priority: Minor
>
> I created a parquet file containing a FIXED_LEN_BYTE_ARRAY column with a
> dictionary:
> {code}
> $ python
> Python 3.10.6 (main, May 29 2023, 11:10:38) [GCC 11.3.0] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import pyarrow as pa
> >>> import pyarrow.parquet as pq
> >>> tbl = pa.Table.from_arrays([pa.array(["foo", "bar", "baz"],
> >>> type=pa.binary(3))], ["col"])
> >>> pq.write_table(tbl, use_dictionary=True, where='/tmp/example.parquet')
> >>>
> $ java -cp 'target/parquet-cli-1.14.0-SNAPSHOT.jar:target/dependency/*'
> org.apache.parquet.cli.Main pages /tmp/example.parquet
> Column: col
> --------------------------------------------------------------------------------
> page type enc count avg size size rows nulls min / max
> 0-D dict S _ 3 3.00 B 9 B
> 0-1 data S R 3 3.33 B 10 B 0 "0x626172"
> / "0x666F6F"
> {code}
> But the dictionary subcommand doesn't seem to work with that column.
> {code}
> $ java -cp 'target/parquet-cli-1.14.0-SNAPSHOT.jar:target/dependency/*'
> org.apache.parquet.cli.Main dictionary /tmp/example.parquet -c col
> Row group 0 dictionary for "col":
> Argument error: Unknown dictionary type: FIXED_LEN_BYTE_ARRAY
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)