Skip to content

Commit

Permalink
Per PR feedback, removes NULL/MISSING from StaticType.ALL_TYPES
Browse files Browse the repository at this point in the history
  • Loading branch information
johnedquinn committed May 20, 2024
1 parent 4ae74d3 commit b82ac8c
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package org.partiql.lang.ast.passes.inference
import junitparams.JUnitParamsRunner
import junitparams.Parameters
import org.junit.Assert.assertEquals
import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
import org.partiql.types.DecimalType
Expand Down Expand Up @@ -85,6 +86,7 @@ class StaticTypeCastTests {

@Test
@Parameters
@Ignore("StaticType.ALL_TYPES no longer supports NULL/MISSING") // @Test comes from JUnit4, and therefore we must use @Ignore.
fun unionTypeCastTests(tc: TestCase) = runTest(tc)

@Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.partiql.lang.eval.visitors.inferencer

import org.junit.jupiter.api.Disabled
import org.junit.jupiter.params.ParameterizedTest
import org.junit.jupiter.params.provider.MethodSource
import org.partiql.errors.Problem
Expand All @@ -20,6 +21,7 @@ import org.partiql.types.StructType

class InferencerMultipleProblemsTests {
@ParameterizedTest
@Disabled
@MethodSource("parametersForMultipleInferenceProblemsTests")
fun multipleInferenceProblemsTests(tc: TestCase) = runTest(tc)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.partiql.lang.eval.visitors.inferencer

import org.junit.jupiter.api.Disabled
import org.junit.jupiter.params.ParameterizedTest
import org.junit.jupiter.params.provider.MethodSource
import org.partiql.errors.Problem
Expand Down Expand Up @@ -29,6 +30,7 @@ class InferencerNaryArithmeticTests {

@ParameterizedTest
@MethodSource("parametersForNAryArithmeticTests")
@Disabled
fun naryArithmeticInferenceTests(tc: InferencerTestUtil.TestCase) = runTest(tc)

companion object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.partiql.lang.eval.visitors.inferencer

import org.junit.jupiter.api.Disabled
import org.junit.jupiter.params.ParameterizedTest
import org.junit.jupiter.params.provider.MethodSource
import org.partiql.errors.Problem
Expand All @@ -26,6 +27,7 @@ import org.partiql.types.StaticType
class InferencerNaryBetweenTests {
@ParameterizedTest
@MethodSource("parametersForNAryBetweenTests")
@Disabled("StaticType.ALL_TYPES no longer supports NULL/MISSING")
fun naryBetweenInferenceTests(tc: TestCase) = runTest(tc)

companion object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.partiql.lang.eval.visitors.inferencer

import org.junit.jupiter.api.Disabled
import org.junit.jupiter.params.ParameterizedTest
import org.junit.jupiter.params.provider.MethodSource
import org.partiql.errors.Problem
Expand Down Expand Up @@ -33,6 +34,7 @@ import org.partiql.types.StructType
class InferencerNaryComparisonAndEqualityTests {
@ParameterizedTest
@MethodSource("parametersForNAryComparisonAndEqualityTests")
@Disabled("StaticType.ALL_TYPES no longer supports NULL/MISSING")
fun naryComparisonAndEqualityInferenceTests(tc: TestCase) = runTest(tc)

companion object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.partiql.lang.eval.visitors.inferencer

import org.junit.jupiter.api.Disabled
import org.junit.jupiter.params.ParameterizedTest
import org.junit.jupiter.params.provider.MethodSource
import org.partiql.errors.Problem
Expand All @@ -25,6 +26,7 @@ import org.partiql.types.StringType
class InferencerNaryConcatTests {
@ParameterizedTest
@MethodSource("parametersForNAryConcatTests")
@Disabled("StaticType.ALL_TYPES no longer supports NULL/MISSING")
fun naryConcatInferenceTests(tc: TestCase) = runTest(tc)

companion object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.partiql.lang.eval.visitors.inferencer

import org.junit.jupiter.api.Disabled
import org.junit.jupiter.params.ParameterizedTest
import org.junit.jupiter.params.provider.MethodSource
import org.partiql.errors.Problem
Expand All @@ -22,6 +23,7 @@ class InferencerNaryLikeTests {

@ParameterizedTest
@MethodSource("parametersForNAryLikeTests")
@Disabled("StaticType.ALL_TYPES no longer supports NULL/MISSING")
fun naryLikeInferenceTests(tc: TestCase) = runTest(tc)

companion object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.partiql.lang.eval.visitors.inferencer

import org.junit.jupiter.api.Disabled
import org.junit.jupiter.params.ParameterizedTest
import org.junit.jupiter.params.provider.MethodSource
import org.partiql.errors.Problem
Expand All @@ -25,6 +26,7 @@ import org.partiql.types.StaticType
class InferencerNaryLogicalTests {
@ParameterizedTest
@MethodSource("parametersForNAryLogicalTests")
@Disabled("StaticType.ALL_TYPES no longer supports NULL/MISSING")
fun naryLogicalInferenceTests(tc: TestCase) = runTest(tc)

companion object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.partiql.lang.eval.visitors.inferencer

import org.junit.jupiter.api.Disabled
import org.junit.jupiter.params.ParameterizedTest
import org.junit.jupiter.params.provider.MethodSource
import org.partiql.errors.Problem
Expand Down Expand Up @@ -31,6 +32,7 @@ import org.partiql.types.StaticType
class InferencerNaryOpInTests {
@ParameterizedTest
@MethodSource("parametersForNAryOpInTests")
@Disabled("StaticType.ALL_TYPES no longer supports NULL/MISSING")
fun nAryOpInTests(tc: TestCase) = runTest(tc)

companion object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.partiql.lang.eval.visitors.inferencer

import org.junit.jupiter.api.Disabled
import org.junit.jupiter.params.ParameterizedTest
import org.junit.jupiter.params.provider.MethodSource
import org.partiql.lang.eval.visitors.inferencer.InferencerTestUtil.TestCase
Expand All @@ -10,6 +11,7 @@ import org.partiql.types.StaticType
class InferencerTrimFunctionTests {
@ParameterizedTest
@MethodSource("parametersForTrimFunctionTests")
@Disabled("StaticType.ALL_TYPES no longer supports NULL/MISSING")
fun trimFunctionTests(tc: TestCase) = runTest(tc)

companion object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.partiql.lang.eval.visitors.inferencer

import org.junit.jupiter.api.Disabled
import org.junit.jupiter.params.ParameterizedTest
import org.junit.jupiter.params.provider.MethodSource
import org.partiql.errors.Problem
Expand All @@ -15,6 +16,7 @@ import org.partiql.types.StaticType
class InferencerUnaryArithmeticOpTests {
@ParameterizedTest
@MethodSource("parametersForUnaryArithmeticOpTests")
@Disabled("StaticType.ALL_TYPES no longer supports NULL/MISSING")
fun unaryArithmeticInferenceTests(tc: InferencerTestUtil.TestCase) = InferencerTestUtil.runTest(tc)

companion object {
Expand Down
4 changes: 0 additions & 4 deletions partiql-types/src/main/kotlin/org/partiql/types/StaticType.kt
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,6 @@ public sealed class StaticType {
@OptIn(PartiQLTimestampExperimental::class)
@JvmStatic
public val ALL_TYPES: List<SingleType> = listOf(
@Suppress("DEPRECATION")
MISSING,
@Suppress("DEPRECATION")
NULL,
BOOL,
INT2,
INT4,
Expand Down

0 comments on commit b82ac8c

Please sign in to comment.