Skip to content

ORC-1475: [C++] ConvertColumnReader.TestConvertNumericToStringVariant fails when compiled with unsigned char - #1579

Merged
guiyanakuang merged 1 commit into
apache:mainfrom
ffacs:ORC-1475
Aug 13, 2023
Merged

guiyanakuang merged 1 commit into
apache:mainfrom
ffacs:ORC-1475

Conversation

@ffacs

@ffacs ffacs commented Aug 13, 2023

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Fix the failure of ConvertColumnReader.TestConvertNumericToStringVariant when char is unsigned.

Why are the changes needed?

The UT fails when compiled with unsigned char.

How was this patch tested?

The UT is passed when compiled both with and without the flag -funsigned-char.

@github-actions github-actions Bot added the CPP label Aug 13, 2023

@wgtmac wgtmac left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @ffacs for a quick fix!

@paliwalashish

Copy link
Copy Markdown
Contributor

+1 Thanks @ffacs

@guiyanakuang guiyanakuang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 LGTM

@guiyanakuang
guiyanakuang merged commit 1c83941 into apache:main Aug 13, 2023
@guiyanakuang

Copy link
Copy Markdown
Member

Merged to main, Thank you @ffacs @wgtmac and @mystic-lama

wgtmac pushed a commit to wgtmac/orc that referenced this pull request Aug 14, 2023
)

### What changes were proposed in this pull request?
Fix the failure of ConvertColumnReader.TestConvertNumericToStringVariant when char is unsigned.

### Why are the changes needed?
The UT fails when compiled with unsigned char.

### How was this patch tested?
The UT is passed when compiled both with and without the flag -funsigned-char.
@dongjoon-hyun dongjoon-hyun added this to the 2.0.0 milestone Aug 15, 2023
@dongjoon-hyun

Copy link
Copy Markdown
Member

Please don't forget to set Milestone field, @guiyanakuang .

@dongjoon-hyun

Copy link
Copy Markdown
Member

BTW, @ffacs and all.

@dongjoon-hyun

Copy link
Copy Markdown
Member

Thank you, @ffacs , @wgtmac , @mystic-lama , @guiyanakuang .
I know that this PR is valid.

As a release manager, I have one question because this is reported during RC0 vote like the following.

bash-5.1$ ./run-all.sh local branch-1.9
Launching centos7 as 85438
...
FAILED centos7
...

I'm wondering how we can reproduce this failure in Docker testing because it was reported in the above via ./run-all.sh local branch-1.9 without any change. Apache ORC branch-1.9 doesn't have that flag, unsigned-char, in our source code or Dockerfiles.

@wgtmac

wgtmac commented Aug 16, 2023 •

Copy link
Copy Markdown
Member

gcc/clang uses signed-char by default on most architectures. But on ARM the default is unsigned-char. I suspect this is the difference.

@dongjoon-hyun

Copy link
Copy Markdown
Member

According to @wgtmac 's comment, #1582 (comment).

gcc/clang uses signed-char by default on most platforms. But on ARM the default is unsigned-char.

I reproduced it on M1 Max. Previously, I ran Docker tests on old Intel Mac while I'm running UTs in M1 Max. So I missed the difference. Thank you, @wgtmac .

@dongjoon-hyun

Copy link
Copy Markdown
Member

This is the way I reproduced.

$ git checkout v1.9.1-rc0
$ git clean -fdx
$ docker system prune -a
$ cd docker
$ ./reinit.sh centos7
$ git branch 0815
$ sh run-one.sh local 0815 centos7

@guiyanakuang

Copy link
Copy Markdown
Member

Please don't forget to set Milestone field, @guiyanakuang .

Thank you for the reminder! I've noted it .

@paliwalashish

Copy link
Copy Markdown
Contributor

@dongjoon-hyun I also found the issue during release validation on M1

@dongjoon-hyun

dongjoon-hyun commented Aug 18, 2023 •

Copy link
Copy Markdown
Member

To @mystic-lama , of course, ORC-1475 is based on your initial report on dev@orc. We appreciated your contribution (testing and reporting).

@dongjoon-hyun I also found the issue during release validation on M1

What I did here is to reproduce your initial report as a part of PR review and validation . :)

cxzl25 pushed a commit to cxzl25/orc that referenced this pull request Jan 11, 2024
)

### What changes were proposed in this pull request?
Fix the failure of ConvertColumnReader.TestConvertNumericToStringVariant when char is unsigned.

### Why are the changes needed?
The UT fails when compiled with unsigned char.

### How was this patch tested?
The UT is passed when compiled both with and without the flag -funsigned-char.
@ffacs
ffacs deleted the ORC-1475 branch January 12, 2024 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants