On Wed, Dec 6, 2023 at 2:19 PM Sutou Kouhei <k...@clear-code.com> wrote: > > Hi, > > In <CAEG8a3Jf7kPV3ez5OHu-pFGscKfVyd9KkubMF199etkfz=e...@mail.gmail.com> > "Re: Make COPY format extendable: Extract COPY TO format implementations" > on Wed, 6 Dec 2023 11:18:35 +0800, > Junwang Zhao <zhjw...@gmail.com> wrote: > > > For the modern formats(parquet, orc, avro, etc.), will they be > > implemented as extensions or in core? > > I think that they should be implemented as extensions > because they will depend of external libraries and may not > use C. For example, C++ will be used for Apache Parquet > because the official Apache Parquet C++ implementation > exists but the C implementation doesn't. > > (I can implement an extension for Apache Parquet after we > complete this feature. I'll implement an extension for > Apache Arrow with the official Apache Arrow C++ > implementation. And it's easy that we convert Apache Arrow > data to Apache Parquet with the official Apache Parquet > implementation.) > > > The patch looks good except for a pair of extra curly braces. > > Thanks for the review! I attach the v2 patch that removes > extra curly braces for "if (isnull)". > For the extra curly braces, I mean the following code block in CopyToFormatBinaryStart:
+ { <-- I thought this is useless? + /* Generate header for a binary copy */ + int32 tmp; + + /* Signature */ + CopySendData(cstate, BinarySignature, 11); + /* Flags field */ + tmp = 0; + CopySendInt32(cstate, tmp); + /* No header extension */ + tmp = 0; + CopySendInt32(cstate, tmp); + } > > Thanks, > -- > kou -- Regards Junwang Zhao