Skip to content

PHOENIX-6400 Do no use local index with uncovered columns in the WHERE clause. - #1158

Merged
lhofhansl merged 1 commit into
apache:masterfrom
lhofhansl:6400
Mar 4, 2021
Merged

PHOENIX-6400 Do no use local index with uncovered columns in the WHERE clause.#1158
lhofhansl merged 1 commit into
apache:masterfrom
lhofhansl:6400

Conversation

@lhofhansl

Copy link
Copy Markdown
Contributor

@lhofhansl
lhofhansl requested a review from kadirozdeMarch 3, 2021 22:08
&& (table.getIndexType() == null || table.getIndexType() == IndexType.GLOBAL)) {
String schemaNameStr = table.getSchemaName()==null?null:table.getSchemaName().getString();
String tableNameStr = table.getTableName()==null?null:table.getTableName().getString();
throw new ColumnNotFoundException(schemaNameStr, tableNameStr, null, ref.getColumn().getName().getString());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It is not clear how returning ColumnNotFoundException results in skipping a plan. Can we add some comments here for that?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

I just brought that code back from before PHOENIX-5109.
It throws an exception, which is then caught in query enumeration in the optimizing phase and consequently ignores that plan.
Happy to add a comment to that extent.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Something like, "This exception will be caught in query enumeration in the optimizing phase and consequently the plan will be ignored" as you wrote, will be helpful. I will then approve it. Thanks!

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

How about this?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@stoty

stoty commented Mar 3, 2021

Copy link
Copy Markdown
Contributor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec7m 43sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-1 ❌test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+1 💚mvninstall17m 9smaster passed
+0hbaserecompile25m 12sHBase recompiled.
+1 💚compile1m 4smaster passed
+1 💚checkstyle0m 34smaster passed
+1 💚javadoc0m 56smaster passed
+0 🆗spotbugs3m 18sphoenix-core in master has 959 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚mvninstall9m 45sthe patch passed
+0hbaserecompile20m 4sHBase recompiled.
+1 💚compile1m 5sthe patch passed
+1 💚javac1m 5sthe patch passed
-1 ❌checkstyle0m 35sphoenix-core: The patch generated 19 new + 155 unchanged - 0 fixed = 174 total (was 155)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 51sthe patch passed
+1 💚spotbugs3m 29sthe patch passed
_ Other Tests _
+1 💚unit110m 26sphoenix-core in the patch passed.
+1 💚asflicense0m 15sThe patch does not generate ASF License warnings.
173m 28s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1158/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#1158
Optional Testsdupname asflicense javac javadoc unit spotbugs hbaserebuild hbaseanti checkstyle compile
unameLinux 18ca91ffdb62 4.15.0-101-generic #102-Ubuntu SMP Mon May 11 10:07:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev/phoenix-personality.sh
git revisionmaster / f7d25b9
Default JavaPrivate Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08
checkstylehttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1158/1/artifact/yetus-general-check/output/diff-checkstyle-phoenix-core.txt
Test Resultshttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1158/1/testReport/
Max. process+thread count9689 (vs. ulimit of 30000)
modulesC: phoenix-core U: phoenix-core
Console outputhttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1158/1/console
versionsgit=2.7.4 maven=3.3.9 spotbugs=4.1.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@lhofhansl
lhofhanslforce-pushed the 6400 branch 2 times, most recently from 48404a9 to 92af25dCompareMarch 4, 2021 01:01

@kadirozdekadirozde left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1, Thanks!

&& (table.getIndexType() == null || table.getIndexType() == IndexType.GLOBAL)) {
String schemaNameStr = table.getSchemaName()==null?null:table.getSchemaName().getString();
String tableNameStr = table.getTableName()==null?null:table.getTableName().getString();
throw new ColumnNotFoundException(schemaNameStr, tableNameStr, null, ref.getColumn().getName().getString());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@stoty

stoty commented Mar 4, 2021

Copy link
Copy Markdown
Contributor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 43sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-1 ❌test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+1 💚mvninstall17m 14smaster passed
+0hbaserecompile25m 25sHBase recompiled.
+1 💚compile1m 6smaster passed
+1 💚checkstyle0m 36smaster passed
+1 💚javadoc0m 56smaster passed
+0 🆗spotbugs3m 18sphoenix-core in master has 959 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚mvninstall9m 59sthe patch passed
+0hbaserecompile21m 12sHBase recompiled.
+1 💚compile1m 5sthe patch passed
+1 💚javac1m 5sthe patch passed
-1 ❌checkstyle0m 35sphoenix-core: The patch generated 21 new + 154 unchanged - 1 fixed = 175 total (was 155)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 50sthe patch passed
+1 💚spotbugs3m 32sthe patch passed
_ Other Tests _
-1 ❌unit107m 55sphoenix-core in the patch failed.
+1 💚asflicense0m 45sThe patch does not generate ASF License warnings.
168m 49s
ReasonTests
Failed junit testsphoenix.end2end.PermissionsCacheIT
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1158/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#1158
Optional Testsdupname asflicense javac javadoc unit spotbugs hbaserebuild hbaseanti checkstyle compile
unameLinux 080ad0c5ed02 4.15.0-101-generic #102-Ubuntu SMP Mon May 11 10:07:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev/phoenix-personality.sh
git revisionmaster / f7d25b9
Default JavaPrivate Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08
checkstylehttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1158/2/artifact/yetus-general-check/output/diff-checkstyle-phoenix-core.txt
unithttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1158/2/artifact/yetus-general-check/output/patch-unit-phoenix-core.txt
Test Resultshttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1158/2/testReport/
Max. process+thread count9706 (vs. ulimit of 30000)
modulesC: phoenix-core U: phoenix-core
Console outputhttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1158/2/console
versionsgit=2.7.4 maven=3.3.9 spotbugs=4.1.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@stoty

stoty commented Mar 4, 2021

Copy link
Copy Markdown
Contributor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 28sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-1 ❌test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+1 💚mvninstall17m 11smaster passed
+0hbaserecompile24m 19sHBase recompiled.
+1 💚compile1m 7smaster passed
+1 💚checkstyle0m 35smaster passed
+1 💚javadoc0m 55smaster passed
+0 🆗spotbugs3m 24sphoenix-core in master has 959 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚mvninstall9m 59sthe patch passed
+0hbaserecompile20m 21sHBase recompiled.
+1 💚compile1m 5sthe patch passed
+1 💚javac1m 5sthe patch passed
-1 ❌checkstyle0m 35sphoenix-core: The patch generated 21 new + 154 unchanged - 1 fixed = 175 total (was 155)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 50sthe patch passed
+1 💚spotbugs3m 32sthe patch passed
_ Other Tests _
+1 💚unit108m 11sphoenix-core in the patch passed.
+1 💚asflicense0m 14sThe patch does not generate ASF License warnings.
164m 29s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1158/3/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#1158
Optional Testsdupname asflicense javac javadoc unit spotbugs hbaserebuild hbaseanti checkstyle compile
unameLinux ed3310a10b1a 4.15.0-101-generic #102-Ubuntu SMP Mon May 11 10:07:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev/phoenix-personality.sh
git revisionmaster / f7d25b9
Default JavaPrivate Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08
checkstylehttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1158/3/artifact/yetus-general-check/output/diff-checkstyle-phoenix-core.txt
Test Resultshttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1158/3/testReport/
Max. process+thread count10719 (vs. ulimit of 30000)
modulesC: phoenix-core U: phoenix-core
Console outputhttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1158/3/console
versionsgit=2.7.4 maven=3.3.9 spotbugs=4.1.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@lhofhansl
lhofhansl merged commit d161867 into apache:masterMar 4, 2021
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@lhofhansl@stoty@kadirozde