The command currently strictly follows the provided instructions and defaults the distribution and sort order if not provided. This means it actually unsets the sort order if it was not provided and sets the distribution to none if the distribution clause is missing. I guess it would be more natural to only change the underlying distribution or ordering if the command overrides that explicitly. Otherwise, keep the existing default. I'd probably adapt the behavior, it would match the doc.
вт, 16 лип. 2024 р. о 08:30 Anton Okolnychyi <aokolnyc...@gmail.com> пише: > If I remember correctly, it was by design. That being said, I see why it > may be confusing. Let me take a closer look. > > вт, 16 лип. 2024 р. о 06:48 Manu Zhang <owenzhang1...@gmail.com> пише: > >> Hi all, >> >> When I recently set a local order to a partitioned table, its write >> distribution was altered from HASH to NONE. That's unexpected but the >> documentation didn't say that the write distribution wouldn't be changed. >> Hence, I thought it might be by design and made a PR to enhance the doc >> <https://github.com/apache/iceberg/pull/10647>. >> >> However, Szehon and Russell pointed out that might be a bug so I'd like >> to check with the community. >> >> Thanks, >> Manu >> >