| 1935 | return; |
| 1936 | } |
| 1937 | saveVectorToFile(vector, dataPathOpt.value().c_str()); |
| 1938 | LOG(ERROR) << "Input vector data: " << dataPathOpt.value(); |
| 1939 | } catch (std::exception& e) { |
| 1940 | LOG(ERROR) << "Error serializing Input vector data: " << e.what(); |
| 1941 | } |
| 1942 | |
| 1943 | try { |
| 1944 | std::stringstream allSql; |
| 1945 | for (int i = 0; i < exprs.size(); ++i) { |
| 1946 | if (i > 0) { |
| 1947 | allSql << ", "; |
| 1948 | } |
| 1949 | allSql << exprs[i]->toSql(); |
| 1950 | } |
| 1951 | auto sqlPathOpt = common::generateTempFilePath(basePath, "allExprSql"); |
| 1952 | if (!sqlPathOpt.has_value()) { |
| 1953 | return; |
| 1954 | } |
| 1955 | saveStringToFile(allSql.str(), sqlPathOpt.value().c_str()); |
| 1956 | LOG(ERROR) << "SQL expression: " << sqlPathOpt.value(); |
| 1957 | } catch (std::exception& e) { |
| 1958 | LOG(ERROR) << "Error serializing SQL expression: " << e.what(); |
| 1959 | } |
| 1960 | } |
| 1961 | } // namespace |
| 1962 | |
| 1963 | void ExprSet::eval( |
| 1964 | int32_t begin, |
| 1965 | int32_t end, |
| 1966 | bool initialize, |
| 1967 | const SelectivityVector& rows, |
| 1968 | EvalCtx& context, |
| 1969 | std::vector<VectorPtr>& result) { |
| 1970 | result.resize(exprs_.size()); |
| 1971 | if (initialize) { |
| 1972 | clearSharedSubexprs(); |
| 1973 | } |
| 1974 | |
| 1975 | // Make sure LazyVectors, referenced by multiple expressions, are loaded |
| 1976 | // for all the "rows". |
| 1977 | // |
| 1978 | // Consider projection with 2 expressions: f(a) AND g(b), h(b) |
| 1979 | // If b is a LazyVector and f(a) AND g(b) expression is evaluated first, it |
| 1980 | // will load b only for rows where f(a) is true. However, h(b) projection |
no test coverage detected