Class Linq4jTest


  • public class Linq4jTest
    extends java.lang.Object
    Tests for LINQ4J.
    • Field Detail

      • EMP_NAME_SELECTOR

        public static final org.apache.calcite.linq4j.function.Function1<Linq4jTest.Employee,​java.lang.String> EMP_NAME_SELECTOR
      • EMP_DEPTNO_SELECTOR

        public static final org.apache.calcite.linq4j.function.Function1<Linq4jTest.Employee,​java.lang.Integer> EMP_DEPTNO_SELECTOR
      • EMP_EMPNO_SELECTOR

        public static final org.apache.calcite.linq4j.function.Function1<Linq4jTest.Employee,​java.lang.Integer> EMP_EMPNO_SELECTOR
      • DEPT_NAME_SELECTOR

        public static final org.apache.calcite.linq4j.function.Function1<Linq4jTest.Department,​java.lang.String> DEPT_NAME_SELECTOR
      • DEPT_DEPTNO_SELECTOR

        public static final org.apache.calcite.linq4j.function.Function1<Linq4jTest.Department,​java.lang.Integer> DEPT_DEPTNO_SELECTOR
      • DEPT_DEPTNO_SELECTOR2

        public static final org.apache.calcite.linq4j.function.IntegerFunction1<Linq4jTest.Department> DEPT_DEPTNO_SELECTOR2
      • ONE_SELECTOR

        public static final org.apache.calcite.linq4j.function.Function1<java.lang.Object,​java.lang.Integer> ONE_SELECTOR
      • PAIR_SELECTOR

        private static final org.apache.calcite.linq4j.function.Function2<java.lang.Object,​java.lang.Object,​java.lang.Integer> PAIR_SELECTOR
    • Constructor Detail

      • Linq4jTest

        public Linq4jTest()
    • Method Detail

      • testSelect

        public void testSelect()
      • testWhere

        public void testWhere()
      • testWhereIndexed

        public void testWhereIndexed()
      • testSelectMany

        public void testSelectMany()
      • testCount

        public void testCount()
      • testCountPredicate

        public void testCountPredicate()
      • testLongCount

        public void testLongCount()
      • testLongCountPredicate

        public void testLongCountPredicate()
      • testAllPredicate

        public void testAllPredicate()
      • testAny

        public void testAny()
      • testAnyPredicate

        public void testAnyPredicate()
      • testAverageSelector

        public void testAverageSelector()
      • testMin

        public void testMin()
      • testMinSelector

        public void testMinSelector()
      • testMinSelector2

        public void testMinSelector2()
      • testMax

        public void testMax()
      • testMaxSelector

        public void testMaxSelector()
      • testMaxSelector2

        public void testMaxSelector2()
      • testAggregate

        public void testAggregate()
      • testToMap

        public void testToMap()
      • testToMapWithComparer

        public void testToMapWithComparer()
      • testToMap2

        public void testToMap2()
      • testToMap2WithComparer

        public void testToMap2WithComparer()
      • testToLookup

        public void testToLookup()
      • testToLookupSelector

        public void testToLookupSelector()
      • testContains

        public void testContains()
      • testContainsWithEqualityComparer

        public void testContainsWithEqualityComparer()
      • testFirst

        public void testFirst()
      • myEnumerable

        private org.apache.calcite.linq4j.Enumerable<java.lang.String> myEnumerable​(int[] closes,
                                                                                    int size)
      • testFirstPredicate1

        public void testFirstPredicate1()
      • testFirstOrDefault

        public void testFirstOrDefault()
      • testFirstOrDefaultPredicate1

        public void testFirstOrDefaultPredicate1()
      • testSingle

        public void testSingle()
      • testSingleOrDefault

        public void testSingleOrDefault()
      • testSinglePredicate1

        public void testSinglePredicate1()
      • testSingleOrDefaultPredicate1

        public void testSingleOrDefaultPredicate1()
      • testIdentityEqualityComparer

        public void testIdentityEqualityComparer()
      • testSelectorEqualityComparer

        public void testSelectorEqualityComparer()
      • testToLookupSelectorComparer

        public void testToLookupSelectorComparer()
      • groupingKeyExtractor

        private static <K extends java.lang.Comparable,​V> org.apache.calcite.linq4j.function.Function1<org.apache.calcite.linq4j.Grouping<K,​V>,​K> groupingKeyExtractor()
      • testGroupBy

        public void testGroupBy()
        Tests the version of ExtendedEnumerable.groupBy(org.apache.calcite.linq4j.function.Function1<TSource, TKey>) that uses an accumulator; does not build intermediate lists.
      • testAggregate2

        public void testAggregate2()
        Tests the version of ExtendedEnumerable.aggregate(org.apache.calcite.linq4j.function.Function2<TSource, TSource, TSource>) that has a result selector. Note how similar it is to testGroupBy().
      • testEmptyEnumerable

        public void testEmptyEnumerable()
      • testSingletonEnumerable

        public void testSingletonEnumerable()
      • testSingletonEnumerator

        public void testSingletonEnumerator()
      • testSingletonNullEnumerator

        public void testSingletonNullEnumerator()
      • testTransformEnumerator

        public void testTransformEnumerator()
      • testCast

        public void testCast()
      • testIterableCast

        public void testIterableCast()
      • checkCast

        private void checkCast​(org.apache.calcite.linq4j.Enumerator<java.lang.Integer> enumerator)
      • testOfType

        public void testOfType()
      • testIterableOfType

        public void testIterableOfType()
      • checkIterable

        private void checkIterable​(org.apache.calcite.linq4j.Enumerator<java.lang.Integer> enumerator)
      • testConcat

        public void testConcat()
      • testUnion

        public void testUnion()
      • testIntersect

        public void testIntersect()
      • testExcept

        public void testExcept()
      • testDistinct

        public void testDistinct()
      • testDistinctWithEqualityComparer

        public void testDistinctWithEqualityComparer()
      • testGroupJoin

        public void testGroupJoin()
      • testGroupJoinWithComparer

        public void testGroupJoinWithComparer()
      • testJoin

        public void testJoin()
      • testLeftJoin

        public void testLeftJoin()
      • testRightJoin

        public void testRightJoin()
      • testFullJoin

        public void testFullJoin()
      • testJoinCartesianProduct

        public void testJoinCartesianProduct()
      • testCartesianProductEnumerator

        public void testCartesianProductEnumerator()
      • testAsQueryable

        public void testAsQueryable()
      • testTake

        public void testTake()
      • testTakeEnumerable

        public void testTakeEnumerable()
      • testTakeQueryable

        public void testTakeQueryable()
      • testTakeEnumerableZeroOrNegativeSize

        public void testTakeEnumerableZeroOrNegativeSize()
      • testTakeQueryableZeroOrNegativeSize

        public void testTakeQueryableZeroOrNegativeSize()
      • testTakeEnumerableGreaterThanLength

        public void testTakeEnumerableGreaterThanLength()
      • testTakeQueryableGreaterThanLength

        public void testTakeQueryableGreaterThanLength()
      • testTakeWhileEnumerablePredicate

        public void testTakeWhileEnumerablePredicate()
      • testTakeWhileEnumerableFunction

        public void testTakeWhileEnumerableFunction()
      • testTakeWhileQueryableFunctionExpressionPredicate

        public void testTakeWhileQueryableFunctionExpressionPredicate()
      • testTakeWhileN

        public void testTakeWhileN()
      • testTakeWhileNNoMatch

        public void testTakeWhileNNoMatch()
      • testSkip

        public void testSkip()
      • testOrderBy

        public void testOrderBy()
      • testOrderByComparator

        public void testOrderByComparator()
      • testOrderByInSeries

        public void testOrderByInSeries()
      • testOrderByDescending

        public void testOrderByDescending()
      • testReverse

        public void testReverse()
      • testList0

        public void testList0()
      • testList

        public void testList()
      • testList2

        public void testList2()
      • testDefaultIfEmpty

        public void testDefaultIfEmpty()
      • testDefaultIfEmpty2

        public void testDefaultIfEmpty2()
      • testElementAt

        public void testElementAt()
      • testElementAtWithoutList

        public void testElementAtWithoutList()
      • testElementAtOrDefault

        public void testElementAtOrDefault()
      • testElementAtOrDefaultWithoutList

        public void testElementAtOrDefaultWithoutList()
      • testLast

        public void testLast()
      • testLastWithoutList

        public void testLastWithoutList()
      • testLastOrDefault

        public void testLastOrDefault()
      • testLastWithPredicate

        public void testLastWithPredicate()
      • testLastOrDefaultWithPredicate

        public void testLastOrDefaultWithPredicate()
      • testSelectManyWithIndexableSelector

        public void testSelectManyWithIndexableSelector()
      • testSelectManyWithResultSelector

        public void testSelectManyWithResultSelector()
      • testSelectManyWithIndexableSelectorAndResultSelector

        public void testSelectManyWithIndexableSelectorAndResultSelector()
      • testSequenceEqual

        public void testSequenceEqual()
      • testSequenceEqualWithoutCollection

        public void testSequenceEqualWithoutCollection()
      • testSequenceEqualWithComparer

        public void testSequenceEqualWithComparer()
      • testSequenceEqualWithComparerWithoutCollection

        public void testSequenceEqualWithComparerWithoutCollection()
      • testGroupByWithKeySelector

        public void testGroupByWithKeySelector()
      • testGroupByWithKeySelectorAndComparer

        public void testGroupByWithKeySelectorAndComparer()
      • testGroupByWithKeySelectorAndElementSelector

        public void testGroupByWithKeySelectorAndElementSelector()
      • stringJoin

        private static java.lang.String stringJoin​(java.lang.String delimiter,
                                                   java.lang.Iterable<java.lang.String> group)
        Equivalent to String.join, but that method is only in JDK 1.8 and higher.
      • testGroupByWithKeySelectorAndElementSelectorAndComparer

        public void testGroupByWithKeySelectorAndElementSelectorAndComparer()
      • testGroupByWithKeySelectorAndResultSelector

        public void testGroupByWithKeySelectorAndResultSelector()
      • testGroupByWithKeySelectorAndResultSelectorAndComparer

        public void testGroupByWithKeySelectorAndResultSelectorAndComparer()
      • testGroupByWithKeySelectorAndElementSelectorAndResultSelector

        public void testGroupByWithKeySelectorAndElementSelectorAndResultSelector()
      • testGroupByWithKeySelectorAndElementSelectorAndResultSelectorAndComparer

        public void testGroupByWithKeySelectorAndElementSelectorAndResultSelectorAndComparer()
      • testZip

        public void testZip()
      • testZipLengthNotMatch

        public void testZipLengthNotMatch()
      • count

        private static int count​(org.apache.calcite.linq4j.Enumerator<java.lang.String> enumerator)
      • testExample

        public void testExample()
      • testApproxConstant

        public void testApproxConstant()
        We use BigDecimal to represent literals of float and double using BigDecimal, because we want an exact representation.