Example #1
0
        private bool GetLineMultifileStreamable()
        {
            if (!_loadedFirstFiles)
            {
                GetLineMultifileStreamableLoadFirstFiles();
                _loadedFirstFiles = true;
            }

            HqlDataSource prior = _from[_from.Count - 2]; // guaranteed to be present b/c there is more than one file
            HqlDataSource src   = _from[_from.Count - 1];

            if (!_initializedForStreaming)
            {
                InitializeSourceForStreaming(src);
                _initializedForStreaming = true;
            }

            if (src.ReadThroughUsingJoin(prior, prior.OnJoin, _where, true))
            {
                _line = _select.Evaluate(src.ResultValues);
                return(true);
            }

            return(false);
        }
Example #2
0
        private void GetLineMultifileStreamableLoadFirstFiles()
        {
            HqlDataSource prior = null;

            for (int i = 0; i < _from.Count - 1; ++i)
            {
                HqlDataSource src = _from[i];
                InitializeSourceForStreaming(src);

                if (i == 0)
                {
                    src.ReadThroughUsingJoin(null, src.OnJoin, _where, false);
                }
                else
                {
                    src.ReadThroughUsingJoin(prior, prior.OnJoin, _where, false);
                    prior.DropLoadedData();
                }

                prior = src;
            }
        }
Example #3
0
        private void CalculateDataMultifiles()
        {
            HqlDataSource prior = _from[_from.Count - 2]; // guaranteed to be present b/c there is more than one file
            HqlDataSource src   = _from[_from.Count - 1];

            InitializeSourceForStreaming(src);

            for (; ; _linenum++)
            {
                if (src.ReadThroughUsingJoin(prior, prior.OnJoin, _where, true))
                {
                    CreateKeyAndValue(src.ResultValues);
                }
                else
                {
                    prior.DropLoadedData();
                    break;
                }
            }
        }