Skip to content

Conversation

@Abigael-JT
Copy link
Contributor

@Abigael-JT Abigael-JT commented Dec 8, 2025

  • Added new object FilteredColumns.java to check for wildcards in the given fields
  • Added wildcard tests for fields command
  • used FilteredColumns.java object to check for wildcards in table commands' fields

Description

Checklists

Testing

General

  • I have checked that my test files and functions have meaningful names.
  • I have checked that each test tests only a single behavior.
  • I have done happy tests.
  • I have tested only my own code.
  • I have tested at least all public methods.

Assertions

  • I have checked that my tests use assertions and not runtime overhead.
  • I have checked that my tests end in assertions.
  • I have checked that there is no comparison statements in assertions.
  • I have checked that assertions are in tests and not in helper functions.
  • I have checked that assertions for iterables are outside of for loops and both sides of the iteration blocks.
  • I have checked that assertions are not tested inside consumers.

Testing Data

  • I have tested algorithms and anything else with the possibility of unbound growth.
  • I have checked that all testing data is local and fully replaceable or reproducible or both.
  • I have checked that all test files are standalone.
  • I have checked that all test-specific fake objects and classes are in the test directory.
  • I have checked that my tests do not contain anything related to customers, infrastructure or users.
  • I have checked that my tests do not contain non-generic information.
  • I have checked that my tests do not do external requests and are not privately or publicly routable.

Statements

  • I have checked that my tests do not use throws for exceptions.
  • I have checked that my tests do not use try-catch statements.
  • I have checked that my tests do not use if-else statements.

Java

  • I have checked that my tests for Java uses JUnit library.
  • I have checked that my tests for Java uses JUnit utilities for parameters.

Other

  • I have only tested public behavior and not private implementation details.
  • I have checked that my tests are not (partially) commented out.
  • I have checked that hand-crafted variables in assertions are used accordingly.
  • I have tested Object Equality.
  • I have checked that I do not have any manual tests or I have a valid reason for them and I have explained it in the PR description.

Code Quality

  • I have checked that my code follows metrics set in Procedure: Class Metrics.
  • I have checked that my code follows metrics set in Procedure: Method Metrics.
  • I have checked that my code follows metrics set in Procedure: Object Quality.
  • I have checked that my code does not have any NULL values.
  • I have checked my code does not contain FIXME or TODO comments.

…iven fields, added wildcard tests for fields command
@Abigael-JT Abigael-JT self-assigned this Dec 8, 2025
@Abigael-JT Abigael-JT linked an issue Dec 9, 2025 that may be closed by this pull request
@Abigael-JT Abigael-JT marked this pull request as ready for review December 9, 2025 11:18
@Abigael-JT Abigael-JT requested a review from eemhu December 9, 2025 11:18
public Node visitFieldType(DPLParser.FieldTypeContext ctx) {
String sql = ctx.getChild(0).getText();
// if fields command has just a field mode and no field names
if (ctx.getChildCount() < 1) {
Copy link
Contributor

Choose a reason for hiding this comment

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

is this check necessary ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it throws NPE otherwise

}

@Test
public void testEquals() {
Copy link
Contributor

Choose a reason for hiding this comment

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

can use EqualsVerifier.forClass(FilteredColumns.class).verify() instead;

@Abigael-JT Abigael-JT mentioned this pull request Dec 19, 2025
33 tasks
Sign up for free to 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.

Fields command does not work correctly with wildcard

2 participants